> This is stemming from the PR: https://github.com/openjdk/jdk/pull/14211 where 
> aggressive GC can cause NPE in `BaseLocale$Key` class. I refactored the 
> in-house cache with WeakHashMap, and removed the Key class as it is no longer 
> needed (thus the original NPE will no longer be possible). Also with the new 
> JMH test case, it gains some performance improvement:
> 
> (w/o fix)
> 
> Benchmark                       Mode  Cnt      Score     Error  Units
> LocaleCache.testForLanguageTag  avgt   20   5781.275 ± 569.580  ns/op
> LocaleCache.testLocaleOf        avgt   20  62564.079 ± 406.697  ns/op
> 
> (w/ fix)
> Benchmark                       Mode  Cnt      Score     Error  Units
> LocaleCache.testForLanguageTag  avgt   20   4801.175 ± 371.830  ns/op
> LocaleCache.testLocaleOf        avgt   20  60394.652 ± 352.471  ns/op

Naoto Sato has updated the pull request with a new target base due to a merge 
or a rebase. The pull request now contains 29 commits:

 - Merge branch 'master' of https://git.openjdk.org/jdk into 
JDK-8309622-Cache-BaseLocale
 - small cleanup
 - Merge branch 'pull/14684' into JDK-8309622-Cache-BaseLocale
 - Update ReferencedKeyTest.java
 - Simple versions of create
 - Add flag for reference queue type
 - Merge branch 'master' into 8310913
 - Update to use VirtualThread friendly stale queue.
 - Merge branch 'pull/14684' into JDK-8309622-Cache-BaseLocale
 - Remove warning tied to String Templates
 - ... and 19 more: https://git.openjdk.org/jdk/compare/7ba8c69a...0e435898

-------------

Changes: https://git.openjdk.org/jdk/pull/14404/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14404&range=04
  Stats: 697 lines in 7 files changed: 129 ins; 441 del; 127 mod
  Patch: https://git.openjdk.org/jdk/pull/14404.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14404/head:pull/14404

PR: https://git.openjdk.org/jdk/pull/14404

Reply via email to