pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
[pgjdbc/pgjdbc] PR #3141: Speed up getDate by parsing bytes instead of String
4+ messages / 2 participants
[nested] [flat]

* [pgjdbc/pgjdbc] PR #3141: Speed up getDate by parsing bytes instead of String
@ 2024-02-23 13:23  "davecramer (@davecramer)" <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: davecramer (@davecramer) @ 2024-02-23 13:23 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

Keep old API and deprecate
Add in new binary API

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3141: Speed up getDate by parsing bytes instead of String
@ 2024-04-08 20:23  "davecramer (@davecramer)" <[email protected]>
  2 siblings, 0 replies; 4+ messages in thread

From: davecramer (@davecramer) @ 2024-04-08 20:23 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

@vlsi this passes all tests now, can I get your review

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3141: Speed up getDate by parsing bytes instead of String
@ 2025-01-24 08:06  "vlsi (@vlsi)" <[email protected]>
  2 siblings, 0 replies; 4+ messages in thread

From: vlsi (@vlsi) @ 2025-01-24 08:06 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

(on pgjdbc/src/main/java/org/postgresql/jdbc/ArrayDecoding.java:339)

I'm afraid I don't understand how this was supposed to improve the performance.
It seems extremely misleading to pass `byte[]`. Initially I thought it was supposed to be a `postgresql binary encoded value`, however, in practice it the method expects a sting in a format of `byte[]`.

Adding `.getBytes()` all over the place does not make life easier as well :-/


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3141: Speed up getDate by parsing bytes instead of String
@ 2025-01-24 08:23  "vlsi (@vlsi)" <[email protected]>
  2 siblings, 0 replies; 4+ messages in thread

From: vlsi (@vlsi) @ 2025-01-24 08:23 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

(on pgjdbc/src/main/java/org/postgresql/jdbc/ArrayDecoding.java:339)

Ah, the core of the change is to avoid `byte[]->String->byte[]` when parsing `text-encoded` dates from the backend. However, it looks like the new implementation might affect cases like `getDate()` which falls back to `.getBytes()` extra conversion.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2025-01-24 08:23 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-02-23 13:23 [pgjdbc/pgjdbc] PR #3141: Speed up getDate by parsing bytes instead of String "davecramer (@davecramer)" <[email protected]>
2024-04-08 20:23 ` "davecramer (@davecramer)" <[email protected]>
2025-01-24 08:06 ` "vlsi (@vlsi)" <[email protected]>
2025-01-24 08:23 ` "vlsi (@vlsi)" <[email protected]>

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