Storing interned strings in CDS archives [JEP 250]

The method in which strings are stored and accessed to and from Class Data Sharing (CDS) archives is inefficient, excessively time consuming, and wastes memory. The following diagram illustrates the method in which Java stores interned strings in a CDS archive:

The inefficiency stems from the current storage schema. Especially when the Class Data Sharing tool dumps the classes into the shared archive file, the constant pools containing CONSTANT_String items have a UTF-8 string representation.

UTF-8 is an 8-bit variable-length character encoding standard.

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.