pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: dfa1 (@dfa1) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] PR #4063: fix: getCharacterStream wraps String in StringReader
Date: Sun, 10 May 2026 06:01:48 +0000
Message-ID: <[email protected]> (raw)

Previously returned new CharArrayReader(value.toCharArray()), which allocates a char[] proportional to the string length (2 * n bytes). StringReader wraps the String directly with no extra allocation.

No benchmark written: the allocation is trivially O(n) and the fix is mechanical. Visible in -prof gc as reduced char[] allocation under any workload that calls getCharacterStream().


view thread (14+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] PR #4063: fix: getCharacterStream wraps String in StringReader
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox