When JVM is initiated it loads the classes in memory as an introductory step. In case there are many different jars having different classes, an apparent lag shows for the initial request. In serverless architecture, such a lag can postpone the boot time which is a critical operation in such an architecture. Application class-data sharing ideas helps in decreasing the start-up time of an application. Java has a live(present) CDS (Class-Data Sharing) attribute. With Application class-data sharing, Java 10 permits to place application classes in a shared archive. This decreases the application startup and footprint by sharing the same common class metadata around multiple java processes.
The three-step process of Application Class data sharing are given:
$java -Xshare:off -XX:+UseAppCDS -XX:DumpLoadedClassList=welcome.lst -cp welcome.jar Greeting
$java -Xshare:dump -XX:+UseAppCDS -XX:SharedClassListFile=welcome.lst -XX:SharedArchiveFile=welcome.jsa -cp welcome.jar
$java -Xshare:on -XX:+UseAppCDS -XX:SharedArchiveFile=welcome.jsa -cp welcome.jar Greeting