In Java 5 through Java 8, the method in which strings were stored and accessed to and from CDS archives was inefficient, excessively time-consuming, and wasted memory. The following diagram illustrates the method by which Java stored interned strings in a CDS archive prior to Java 9:
The inefficiency stemmed from the storage schema. This was especially evident when the CDS tool dumped 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.