On Sun, 1 Mar 2026 03:41:47 GMT, Michael Strauß <[email protected]> wrote:
> The current implementation of `Renderer.getPeerInstance()` looks up mappings > by concatenating strings to form a combined key: > > peer = peerCache.get(name + "_" + unrollCount); > > > This can be improved by not using strings to store the combined key, but > using a simple `PeerCacheKey` class instead. > The `Renderer` class then uses a single reusable `PeerCacheKey` object to > look up mappings, making the lookup allocation-free. > > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). This pull request has now been integrated. Changeset: 9a77a6af Author: Michael Strauß <[email protected]> URL: https://git.openjdk.org/jfx/commit/9a77a6af0f61c68ef1fa7a371179fe46ca0f81ed Stats: 198 lines in 4 files changed: 157 ins; 20 del; 21 mod 8378895: Reduce object allocations in Renderer.getPeerInstance() Reviewed-by: mhanl, jhendrikx ------------- PR: https://git.openjdk.org/jfx/pull/2091
