https://bz.apache.org/bugzilla/show_bug.cgi?id=63235
Bug ID: 63235 Summary: Defer potentially expensive Charset.availableCharsets() call Product: Tomcat 9 Version: 9.0.16 Hardware: PC OS: Mac OS X 10.1 Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: pw...@pivotal.io Target Milestone: ----- The `org.apache.tomcat.util.buf.B2CConverter` class includes a static `encodingToCharsetCache` map populated in a static initializer by calling `Charset.availableCharsets()`. This is quite an expensive operation and it may be unnecessary as calls to `B2CConverter.getCharset` often use the standard `UTF-8` charset. Some local testing shows that if we don't create the cache then we save 157 classes from being loaded and improve startup time. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org