Status of AppCDS
augustnagro at gmail.com
Mon Oct 2 21:25:16 UTC 2017
Both Class Data Sharing (CDS)  and AppCDS  are very interesting but
seemingly neglected features of the Java Platform, offering the ability to
reduce startup time.
Class Data Sharing is the global cache stored in
/lib/[arch]/server/classes.jsa, and circumvents long class-loading times by
caching the JVM’s internal representation of system jars and memory-mapping
them in during startup. The feature's documentation  has been updated
for Java 9, but I have yet to see a JDK or JRE installation that can use it
without manually generating the archive. In every case I've encountered,
the file needs to first be created (and given appropriate access
permissions) with admin access, and then generated by `java -Xshare:dump`.
AppCDS extends the same feature to user libraries. It works well, but has
been experimental since (before?) JDK 8 and is commercial.
Java has been criticized for its slow startup times. Improvements would
enable command line utilities, the realistic use of JShell .jsh scripts
(currently takes >4 seconds for hello world on my Mac ), and other
applications. I'm not sure how *CDS concerts with other OpenJDK efforts
like AOT compilation, but it offers the advantage of architecture
independency and the ability to be shared across multiple JVMs.
Is *CDS doomed for deprecation, or will it be improved? Without work to CDS
or changes to AppCDS, the current state is not very usable.
Executing command `jshell helloworld.jsh`, with file containing
More information about the discuss