On Fri, 27 Mar 2026 08:49:49 GMT, Alan Bateman <[email protected]> wrote:
> > Do we think it is worth proceeding with this change? > > Thanks for the further context (and to Eirik Bjorsnos for digging into the > Cassandra code). I don't know how common it is for pooled threads to change > their thread names for the task they are executing but there are at least > some cases. For non-trivial tasks then I assume the cost of changing the > thread name is in the noise but for tiny tasks then maybe it's an issue. > Going forward then I hope there will be less pooling/sharing with tasks > executed by virtual threads. > > So I think I agree it's worth trying to improve although I'm a bit dubious > about have Thread.setName check if the name is the same as the old name, does > that really help? Well it obviously helps if the name doesn't change. However, that is not the usage pattern that would affect Cassandra. According to my measurements, the same-name check adds a few ns to the common case. I am not sure if it's useful for any real workload, though. I have removed that check. ------------- PR Comment: https://git.openjdk.org/jdk/pull/30374#issuecomment-4153256415
