On Sun, 7 Feb 2021 19:44:41 GMT, Johannes Kuhn <[email protected]> wrote:
>> This patch refactor JDK internal charsets to initialize charset mapping data
>> lazily when needed via holder classes. This means both a startup improvement
>> in some cases, and possible throughput improvements for all DoubleByte-based
>> Charsets.
>>
>> Testing: tier1-3
>
> src/java.base/share/classes/java/lang/ModuleLayer.java line 936:
>
>> 934: for (Module m : nameToModule.values()) {
>> 935: servicesCatalog.register(m);
>> 936: }
>
> Seems to be unrelated, but it's not a bad change.
As with the `StringConcatFactory` changes @stsypanov commented on, I did this
to reduce noise when zooming in on the cost of `Charset` class initialization
stemming from `Charset.availableCharsets()`. I ended up preferring the
desugared version, so I left it in.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2449