https://bugs.openjdk.org/browse/JDK-8338677 already improved things for this so that's good.
This fix adds to it lazy initialisation of VarHandles in StrikeCache at the cost of some extra code. Since these VarHandles get used more or less immediately on Linux this new fix won't further improve matters there But should help on Mac where they aren't usually needed at startup And Windows is somewhere in between. ------------- Commit messages: - 8337505 - 8337505 Changes: https://git.openjdk.org/jdk/pull/21748/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21748&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8337505 Stats: 98 lines in 1 file changed: 70 ins; 0 del; 28 mod Patch: https://git.openjdk.org/jdk/pull/21748.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/21748/head:pull/21748 PR: https://git.openjdk.org/jdk/pull/21748