pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: vlsi (@vlsi) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #3693: Overhead of uncontended use of ResourceLock
Date: Mon, 30 Jun 2025 10:02:27 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

> At first impression I'm not really sure I sympatise with a user expecting a very specific behaviour from a concurrent, uncoordinated call to getWarnings ?

The thing is pgjdbc is wildly used in many applications, so we want to avoid breakages even for the clients who are not doing the best possible thing.

> Attaching a new flamegraph zip file, hopefully this works better.

This works much better, thank you. Do you think you could share the source data for it? (I mean stacks.txt file or jfr or whatever was the raw data for the flamegraph)

> Slightly off-topic, but I'd also love it if the cache implementation could be pluggable

Sure Caffeine is an option, and we "discuss" it here: https://github.com/pgjdbc/pgjdbc/issues/345#issuecomment-320901092
The default artifact will likely shadow Caffeine to avoid clashes with pgjdbc users' Caffeine though.

---

An interesting experiment could be to replace `ResourceLock` with a dummy class that does nothing, and then compare the thoughput, cpu utilization and the latency numbers. Sure we can't shave all the synchronization, however, it could probably give rough estimates on the improvements possible.

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] issue #3693: Overhead of uncontended use of ResourceLock
  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