JDK-6862165 : Startup of class ExtendedCharsets could be faster
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.nio.charsets
  • Affected Version: 7
  • Priority: P5
  • Status: Open
  • Resolution: Unresolved
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2009-07-20
  • Updated: 2011-02-16
Description
A DESCRIPTION OF THE REQUEST :
On start-up, class ExtendedCharsets instantiates hundreds of Strings and puts them into 3 hashmaps.
Better have all those names in a single (maybe 3) well-sorted indexed byte/char array/s, ideally loaded from a data file (pre-generated by JDK make processing).

JUSTIFICATION :
Filling all the strings in the hashmaps needs some time, and should be superfluous at start-up.
It should be sufficient, to only put according names in the cache hashmap when a charset is first instantiated.
Start-up of ExtendedCharsets influences JDK start-up time, when extended charset is configured for default charset. See also: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6795536