Scala 3 and Data Sharing on Windows ↩
Introduced in J2SE 5.0, Java class data sharing (CDS) helps reduce the startup time for Java applications as well as reduce their memory footprint. This page presents findings from our experiments with CDS and Scala 3 on a Windows machine. |
This document is part of a series of topics related to Scala 3 on Windows:
- Running Scala 3 on Windows
- Building Scala 3 on Windows
- Data Sharing and Dotty on Windows ▼
- OpenJDK and Scala 3 on Windows
Ada, Akka, C++, Dart, Deno, Flix, Golang, GraalVM, Haskell, Kotlin, LLVM, Node.js, Rust, Spark, Spring, TruffleSqueak, WiX Toolset and Zig are other topics we are currently monitoring.
This project depends on the following external software for the Microsoft Windows platform:
- Git 2.45 (release notes)
- Scala 3 (release notes)
- Temurin OpenJDK 17 LTS 1 (release notes, bug fixes, Java 17 API)
🔎 Scala 2.12 is a software product announced to require Java 8. In contrast Scala 2.13 and Scala 3 also support Java 9+. In the following we work with Temurin OpenJDK 11, the 2nd LTS version after Java 8.
For instance our development environment looks as follows (November 2024):
C:\opt\Git\ (315 MB) C:\opt\jdk-temurin-17.0.11_9\ (302 MB) C:\opt\scala3-3.3.3\ ( 57 MB)
🔎 Git for Windows provides a BASH emulation used to run
git
from the command line (as well as over 250 Unix commands likeawk
,diff
,file
,grep
,more
,mv
,rmdir
,sed
andwc
).
This project is organized as follows:
bin\sharedata.bat cdsexamples\DottyExample,JavaExample CDS.md setenv.bat
where
- file
bin\sharedata.bat
creates/installs Java shared archives for the Dotty compiler/runner. - directory
cdsexamples\DottyExample\
contains a tiny Scala code example demonstrating data sharing. - directory
cdsexamples\JavaExample\
contains a tiny Java code example demonstrating data sharing. - file
CDS.md
is the Markdown document for this page.
In the next sections we present both examples and describe the usage of command sharedata
.
Source file src\main\java\Main.java
is the main program of our Java code example:
package cdsexamples;
public class Main {
public static void main(String[] args) {
System.out.println("Hello from Java !");
if (args.length > 0) {
System.out.println(VMOptions.asString());
//ScriptEngineTest.run(); // .jsa file size: 9 Mb -> 24 Mb !
}
}
}
Batch command build.bat
has two new options working with the run
subcommand:
- Option
-iter:<n>
specifies the number of run iterations (for calculating meaningful average load times). - Option
-share
enables/disables data sharing.
> build help Usage: build { <option> | <subcommand> } Options: -iter:<1..99> set number of run iterations -share[:<on|off>] enable/disable data sharing (default:off) -verbose print progress messages Subcommands: clean delete generated files compile compile Java source files doc generate Java documentation help print this help message run[:<arg>] execute main class with 1 optional argument
🔎 Internally the
compile
subcommand generates a Java archive and a Java shared archive as a last step of the compilation phase.
We first execute command build clean compile
; the same command with option -verbose
prints out the progress messages:
> build clean compile > build -verbose clean compile Delete output directory target Create Java archive target\JavaExample.jar Create class list file target\JavaExample.classlist Create Java shared archive target\JavaExample.jsa
We can now execute our Java example without data sharing; the same command with option -verbose
prints out the execution report:
> build run Hello from Java ! > build run -verbose Execute Java archive (#iterations=1) target\JavaExample.jar Hello from Java ! Execution report: Share flag : off Shared archive : target\JavaExample.jsa Shared classes : 0 File classes : 1 jrt images : 599 Load time : 0.108 #iteration(s) : 1 Execution logs : target\logs\log_share_off.log Classes per package (600): java.io.* (38), java.lang.* (168), java.math.* (0), java.net.* (9) java.nio.* (38), java.security.* (24), java.util.* (137) jdk.* (111), scala.* (0), sun.* (74) [APP] cdsexamples.* (1)
🔎 Subcommand
run
accepts 1 optional argument for testing purposes; for instancebuild run:1
produces the following output (seesrc\main\java\VMOptions.java
):> build run:1 Hello from Java ! VM Options: -Xshare:off -XX:SharedArchiveFile=C:\<project_path>\target\JavaExample.jsa -Xlog:disableValue for
-Xlog
is different withbuild run:1 -verbose
:-Xlog:class+load:file=<project_path>\target\logs\log_share_on.logWe have submitted a bug report related to the usage of option
-Xlog
on Windows (see JDK-8215398); the bug was fixed on January 2, 2019.
For comparison here is the console output with data sharing; option -verbose
prints out the execution report:
> build run -share Hello from Java ! > build run -verbose -share Execute Java archive (#iterations=1) target\JavaExample.jar Hello from Java ! Execution report: Share flag : on Shared archive : target\JavaExample.jsa Shared classes : 589 File classes : 0 jrt images : 1 (sun.nio.fs.WindowsLinkSupport source: jrt:/java.base) Load time : 0.088 #iteration(s) : 1 Execution logs : target\logs\log_share_on.log Classes per package (590): java.io.* (38), java.lang.* (168), java.math.* (0), java.net.* (9) java.nio.* (38), java.security.* (23), java.util.* (137) jdk.* (103), scala.* (0), sun.* (73) [APP] cdsexamples.* (1)
Subcommand run
with option -iter:<n>
(where n=1..99
) executes the Java program n
times:
> build run -verbose -share -iter:4 Execute Java archive (#iterations=4) target\JavaExample.jar Hello from Java ! Hello from Java ! Hello from Java ! Hello from Java ! Execution report: Share flag : on Shared archive : target\JavaExample.jsa Shared classes : 589 File classes : 0 jrt images : 1 (sun.nio.fs.WindowsLinkSupport source: jrt:/java.base) Average load time: 0.088s #iteration(s) : 4 Execution logs : target\logs\log_share_on.log Classes per package (590): java.io.* (38), java.lang.* (168), java.math.* (0), java.net.* (9) java.nio.* (38), java.security.* (23), java.util.* (137) jdk.* (103), scala.* (0), sun.* (73) [APP] cdsexamples.* (1)
Let's check the contents of the output directory target\
:
> tree /a /f target | findstr /v "^[A-Z]" | JavaExample.classlist | JavaExample.jar | JavaExample.jsa | MANIFEST.MF +---classes | | .latest-build | \---cdsexamples | JavaExample.classs | ScriptEngineTest.class | VMOptions.class \---logs log_classlist.log log_dump.log log_share_off.log log_share_on.log
Note the following about the generated files:
- File
MANIFEST.MF
is added toJavaExample.jar
as usual. - Files
logs\log_classlist.log
andlogs\log_dump.log
are generated when option-verbose
is passed to thecompile
subcommand; they contain the execution logs for the generation ofJavaExample.classlist
resp.JavaExample.jsa
. - File
logs\log_share_off.log
is generated when option-share:off
is passed to therun
subcommand. - File
logs\log_share_on.log
is generated when option-share:on
is passed to therun
subcommand.
For instance we can read from file logs\log_share_off.log
that source of cdsexamples.Main
is file:/
and that the total load time on the last line is 0.124s
:
[0.008s][info][class,load] opened: c:\opt\jdk-temurin-17.0.9_9\lib\modules [0.018s][info][class,load] java.lang.Object source: jrt:/java.base [...] [0.121s][info][class,load] cdsexamples.Main source: file:/<project_path>/target/JavaExample.jar [...] [0.124s][info][class,load] java.lang.Shutdown$Lock source: jrt:/java.base
We can also execute the java
command (from Java 9+) directly to check if data sharing is effectively used:
> java -verbose:class -Xshare:on -XX:SharedArchiveFile=target\JavaExample.jsa ^ -jar W:\cdsexamples\JavaExample\target\JavaExample.jar | findstr cdsexamples [0.089s][info][class,load] cdsexamples.Main source: shared objects file > java -verbose:class -Xshare:off -XX:SharedArchiveFile=target\JavaExample.jsa ^ -jar W:\cdsexamples\JavaExample\target\JavaExample.jar | findstr cdsexamples [0.112s][info][class,load] cdsexamples.Main source: file:/W:/dotty-examples/cdsexamples/JavaExample/target/Main.jar
⚠️ The crucial point here is to use the correct path ofJavaExample.jar
together with the specified Java shared archive. Commandgrep -a
(-a
means "process a binary file as if it were text") helps us to extract that path fromJavaExample.jsa
.> grep -aPo '.{0,40}JavaExample.jar{0,40}' target\JavaExample.jsa W:\cdsexamples\JavaExample\target\JavaExample.jar W:\cdsexamples\JavaExample\target\JavaExample.jar
Scala 3 example ▴
Source file src\main\scala\Main.scala
is the main program of our Scala 3 code example:
package cdsexamples
object Main {
def main(args: Array[String]): Unit = {
println("Hello from Scala 3 !")
if (args.length > 0) {
println(VMOptions.asString)
//TastyTest.run()
}
}
}
Batch command build.bat
has two new options working with the run
subcommand:
- Option
-iter:<n>
specifies the number of run iterations (for calculating meaningful average load times). - Option
-share
enables/disables data sharing.
> build help Usage: build { <option> | <subcommand> } Options: -iter:<1..99> set number of run iterations -share[:<on|off>] enable/disable data sharing (default:off) -verbose print progress messages Subcommands: clean delete generated files compile compile Scala source files doc generate Scala documentation help print this help message run[:<arg>] execute main class with 1 optional argument
🔎 Internally the
compile
subcommand generates a Java archive and a Java shared archive as a last step of the compilation phase.
Similarly to the previous section we execute the following command; option -verbose
prints out the progress messages:
> build clean compile > build -verbose clean compile Delete output directory target Create Java archive target\DottyExample.jar Create class list file target\DottyExample.classlist Create Java shared archive target\DottyExample.jsa
We can now execute our Scala 3 example without data sharing (default settings: -share:off
); option -verbose
prints out the execution report:
> build run Hello from Scala 3 ! > build run -verbose Execute Java archive (#iterations=1) target\DottyExample.jar Hello from Scala 3 ! Execution report: Share flag : off Shared archive : target\DottyExample.jsa Shared classes : 0 File classes : 265 jrt images : 671 Load time : 0.355 #iteration(s) : 1 Execution logs : target\logs\log_share_off.log Classes per package (940): java.io.* (39), java.lang.* (215), java.math.* (3), java.net.* (9) java.nio.* (38), java.security.* (24), java.util.* (142) jdk.* (125), sun.* (80) [APP] cdsexamples.* (2) scala.* (28), scala.collection.* (161), scala.compat.* (0) scala.io.* (1), scala.math.* (19), scala.reflect.* (25) scala.runtime.* (5), scala.sys.* (10), scala.util.* (14)
For comparison here is the output with data sharing; option -verbose
prints out the execution report:
> build run -share Hello from Scala 3 ! > build run -verbose -share Execute Java archive (#iterations=1) target\DottyExample.jar Hello from Scala 3 ! Execution report: Share flag : on Shared archive : target\DottyExample.jsa Shared classes : 873 File classes : 0 jrt images : 1 (sun.nio.fs.WindowsLinkSupport source: jrt:/java.base) Load time : 0.139 #iteration(s) : 1 Execution logs : target\logs\log_share_on.log Classes per package (874): java.io.* (34), java.lang.* (207), java.math.* (3), java.net.* (9) java.nio.* (27), java.security.* (23), java.util.* (122) jdk.* (110), sun.* (74) [APP] cdsexamples.* (2) scala.* (28), scala.collection.* (161), scala.compat.* (0) scala.io.* (1), scala.math.* (19), scala.reflect.* (25) scala.runtime.* (5), scala.sys.* (10), scala.util.* (14)
Subcommand run
with option -iter:<n>
(n=1..99
) executes n
times the Scala 3 example:
> build run -verbose -share -iter:4 Execute Java archive (#iterations=4) target\DottyExample.jar Hello from Scala 3 ! Hello from Scala 3 ! Hello from Scala 3 ! Hello from Scala 3 ! Execution report: Share flag : on Shared archive : target\DottyExample.jsa Shared classes : 873 File classes : 0 jrt images : 1 (sun.nio.fs.WindowsLinkSupport source: jrt:/java.base) Average load time: 0.126s #iteration(s) : 4 Execution logs : target\logs\log_share_on.log Classes per package (874): java.io.* (34), java.lang.* (207), java.math.* (3), java.net.* (9) java.nio.* (27), java.security.* (23), java.util.* (122) jdk.* (110), sun.* (74) [APP] cdsexamples.* (2) scala.* (28), scala.collection.* (161), scala.compat.* (0) scala.io.* (1), scala.math.* (19), scala.reflect.* (25) scala.runtime.* (5), scala.sys.* (10), scala.util.* (14)
Finally we can check the contents of the output directory target\
:
> tree /a /f target | findstr /v "^[A-Z]" | DottyExample.classlist | DottyExample.jar | DottyExample.jsa | MANIFEST.MF +---classes | | .latest-build | \---cdsexamples | Main$.class | Main.class | Main.tasty | TastyTest$.class | TastyTest.class | TastyTest.tasty | VMOptions$.class | VMOptions.class | VMOptions.tasty \---logs log_classlist.log log_dump.log log_share_off.log log_share_on.log
Note the following about the generated files:
- File
MANIFEST.MF
is added toDottyExample.jar
as usual. - Files
classes\Main$.class
andclasses\Main.tasty
(typed AST) are specific to the Scala 3 compiler. - Files
logs\log_classlist.log
andlogs\log_dump.log
are generated when option-verbose
is passed to thecompile
subcommand; they contain the execution logs for the generation ofDottyExample.classlist
resp.DottyExample.jsa
. - File
logs\log_share_off.log
is generated when option-share:off
is passed to therun
subcommand. - File
logs\log_share_on.log
is generated when option-share:on
is passed to therun
subcommand.
Batch command sharedata
▴
Command sharedata
creates and (un-)installs Java shared archives for both scala
and scalac
:
> sharedata help Usage: sharedata { <option> | <subcommand> } Options: -share[:<on|off>] set the share flag (default:off) -verbose print progress messages Subcommands: activate install the Java shared archive dump create the Java shared archive help print this help message reset uninstall the Java shared archive test execute test application (depends on dump)
> sharedata activate Create class list file out\data-sharing\dotty-cds-compiler.classlist Create Java shared archive out\data-sharing\dotty-cds-compiler.jsa Create class list file out\data-sharing\dotty-cds-repl.classlist Create Java shared archive out\data-sharing\dotty-cds-repl.jsa Support files for Java class sharing: dotty-cds-compiler.classlist (119 Kb) dotty-cds-compiler.jsa (55616 Kb) dotty-cds-repl.classlist (31 Kb) dotty-cds-repl.jsa (16640 Kb) dotty-cds_0.27-0.27.0-RC1.jar (3 Kb)
> dir /b c:\opt\scala3_3.3.3\lib\dotty-cds* dotty-cds-compiler.classlist dotty-cds-compiler.jsa dotty-cds-repl.classlist dotty-cds-repl.jsa dotty-cds_3-3.3.3.jar
package cds object Main { def main(args: Array[String]): Unit = { println("Support files for Java class sharing:") val jarUrl = getClass().getProtectionDomain().getCodeSource().getLocation() val libDir = java.nio.file.Paths.get(jarUrl.toURI()).getParent().toFile() val files = libDir.listFiles.filter(_.getName.startsWith("dotty-cds")) files.foreach(f => println(" "+f.getName()+" ("+(f.length()/1024)+" Kb)")) } }
Subcommand test
...tbd...; option -verbose
prints out the execution report:
> sharedata test Support files for Java class sharing: dotty-cds-compiler.classlist (119 Kb) dotty-cds-compiler.jsa (55616 Kb) dotty-cds-repl.classlist (31 Kb) dotty-cds-repl.jsa (16640 Kb) dotty-cds_0.27-0.27.0-RC1.jar (3 Kb) > sharedata -verbose test Execute test application with Scala REPL WITHOUT Java shared archive Support files for Java class sharing: dotty-cds-compiler.classlist (120 Kb) dotty-cds-compiler.jsa (56832 Kb) dotty-cds-repl.classlist (31 Kb) dotty-cds-repl.jsa (16640 Kb) dotty-cds_0.27-0.27.0-RC1.jar (4 Kb) Execution report: Share flag : off Shared archive : out\data-sharing\dotty-cds-repl.jsa Shared classes : 0 File classes : 274 jrt images : 680 Load time : 0.386s Execution logs : out\data-sharing\logs\dotty-cds-repl-share.log Classes per package (949): java.io.* (41), java.lang.* (218), java.net.* (9), java.nio.* (41) java.security.* (24), java.util.* (142), jdk.* (121), sun.* (81) [APP] cds.* (2) scala.* (28), scala.collection.* (165), scala.compat.* (0) scala.io.* (1), scala.math.* (19), scala.reflect.* (27) scala.runtime.* (6), scala.sys.* (10), scala.util.* (14)
> sharedata -verbose -share test Execute test application with Scala REPL WITH Java shared archive Support files for Java class sharing: dotty-cds-compiler.classlist (119 Kb) dotty-cds-compiler.jsa (55616 Kb) dotty-cds-repl.classlist (31 Kb) dotty-cds-repl.jsa (16640 Kb) dotty-cds_0.27-0.27.0-RC1.jar (3 Kb) Execution report: Share flag : on Shared archive : out\data-sharing\dotty-cds-repl.jsa Shared classes : 887 File classes : 0 jrt images : 1 (sun.nio.fs.WindowsLinkSupport source: jrt:/java.base) Load time : 0.140s Execution logs : out\data-sharing\logs\dotty-cds-repl-share.log Classes per package (888): java.io.* (36), java.lang.* (210), java.net.* (9), java.nio.* (30) java.security.* (23), java.util.* (122), jdk.* (106), sun.* (75) [APP] cds.* (2) scala.* (28), scala.collection.* (165), scala.compat.* (0) scala.io.* (1), scala.math.* (19), scala.reflect.* (27) scala.runtime.* (6), scala.sys.* (10), scala.util.* (14)
☛ Data Sharing and Oracle OpenJDK 11
The Oracle OpenJDK 11 installation contains the file<install_dir>\lib\classlist
. Let's check if data sharing is enabled:
- Command
java.exe -version
displays the OpenJDK version amongst other information; in particular, the last displayed line ends with(build 11.0.20+8, mixed mode, sharing)
if data sharing is enabled, with(build 11.0.20+8, mixed mode)
otherwise.- Command
java.exe -Xshare:dump
generates the 17.3 Mb Java shared archive<install_dir>\bin\server\classes.jsa
from file<install_dir>\lib\classlist
.- Repeat command from point 1.
> c:\opt\jdk-temurin-11.0.20_8\bin\java -version openjdk version "11.0.20" 2023-07-18 OpenJDK Runtime Environment Temurin-11.0.19+7 (build 11.0.19+7) OpenJDK 64-Bit Server VM Temurin-11.0.19+7 (build 11.0.19+7, mixed mode) > c:\opt\jdk-temurin-11.0.17_8\bin\java -Xshare:dump [...] Number of classes 1272 [...] mc space: 8416 [ 0.0% of total] [...] rw space: 4022976 [ 22.2% of total] [...] ro space: 7305216 [ 40.4% of total] [...] md space: 2560 [ 0.0% of total] [...] od space: 6534648 [ 36.1% of total] [...] total : 17873816 [100.0% of total] [...] > dir /b c:\opt\jdk-temurin-11.0.20_8\bin\server classes.jsa jvm.dll > c:\opt\jdk-temurin-11.0.20_8\bin\java -version openjdk version "11.0.20" 2023-07-18 OpenJDK Runtime Environment Temurin-11.0.20+8 (build 11.0.20+8) OpenJDK 64-Bit Server VM Temurin-11.0.20+8 (build 11.0.20+8, mixed mode, sharing)Java 12 introduces default CDS archives (JEP 341) to improve out-of-the-box startup time and to get rid of the need to run
-Xshare: dump
to benefit from the CDS.
Usage example ▴
> cd examples\enum-Planet > scalac -share -d target\classes src\main\scala\Planet.scala "-J-Xlog:class+load=info" > class-load.txt
We can observe that 24 classes could not be found in the Java shared archive dotty-cds-compiler.jsa
:
> findstr /c:"source: file" class-load.txt [0.761s][info][class,load] dotty.tools.dotc.core.Comments$Comment$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [0.766s][info][class,load] dotty.tools.dotc.ast.untpd$Mod$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [0.766s][info][class,load] dotty.tools.dotc.ast.untpd$Mod$Enum$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [0.771s][info][class,load] dotty.tools.dotc.ast.untpd$Mod$Private$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [0.772s][info][class,load] dotty.tools.dotc.ast.untpd$Mod$Final$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [0.782s][info][class,load] dotty.tools.dotc.parsing.xml.Utility$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [0.783s][info][class,load] dotty.tools.dotc.ast.untpd$GenFrom$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [0.783s][info][class,load] dotty.tools.dotc.ast.untpd$ForDo$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [0.784s][info][class,load] dotty.tools.dotc.ast.untpd$InterpolatedString$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [0.979s][info][class,load] dotty.tools.dotc.ast.DesugarEnums$CaseKind$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [0.988s][info][class,load] dotty.tools.dotc.typer.ProtoTypes$PolyProto$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [1.101s][info][class,load] dotty.tools.dotc.core.Types$RecType$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [1.349s][info][class,load] dotty.tools.dotc.ast.desugar$IdPattern$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [1.407s][info][class,load] scala.collection.mutable.ListBuffer$$anon$1 source: file:/C:/opt/dotty-0.27.0-RC1/lib/scala-library-2.13.0.jar [1.464s][info][class,load] dotty.tools.dotc.ast.Trees$Import$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [1.473s][info][class,load] dotty.tools.dotc.ast.Trees$Typed$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [1.479s][info][class,load] dotty.tools.dotc.ast.Trees$SeqLiteral$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [1.574s][info][class,load] scala.runtime.java8.JFunction1$mcZI$sp source: file:/C:/opt/dotty-0.27.0-RC1/lib/scala-library-2.13.0.jar [1.821s][info][class,load] dotty.tools.dotc.core.NameOps$TermNameDecorator$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [1.842s][info][class,load] dotty.tools.dotc.ast.Trees$Assign$ source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [1.928s][info][class,load] dotty.tools.backend.jvm.BCodeAsmCommon$EnclosingMethodEntry source: file:/C:/opt/dotty-0.27.0-RC1/lib/dotty-compiler_0.27-0.27.0-RC1.jar [2.075s][info][class,load] scala.transient source: file:/C:/opt/dotty-0.27.0-RC1/lib/scala-library-2.13.0.jar [2.076s][info][class,load] scala.volatile source: file:/C:/opt/dotty-0.27.0-RC1/lib/scala-library-2.13.0.jar
- From Java 8 to 11 and beyond: A categorized list of all Java and JVM features since JDK 8
- by Dávid Csákvári (2019-07-19)
JDK 8 was released in 2014. But since then things accelerated and many features came out with JDK10, JDK11 and beyond.
- Oracle Code 2018: Application Class Data Sharing
- by Ioi Lam and Jiangli Zhou (2018-10-23)
Archiving and Sharing Class Metadata and Java Objects in HotSpot VM to Improve Startup Performance and Reduce Footprint (PDF). - JEP 341: Default CDS Archives
- by Jiangli Zhou, Calvin Cheung, Ioi Lam (2018-06-01)
The JDK build process now generates a CDS archive, using the default class list, on 64-bit platforms. - JEEConf 2018: Class Data Sharing in the HotSpot VM
- by Volker Simonis (2018-06-05)
In his talk Volker Simonis introduces CDS and AppCDS and demonstrates how it can be used (web slides). - JVM Class Data Sharing
- by Igor Kupczyńsk (2018-05-29)
How to enable Class Data Sharing (CDS) for a java app and what are the benefits of doing so. - IBM Developer: Class sharing in Eclipse OpenJ9
- by Ben Corrie and Hang Shao (2018-06-06)
In the OpenJ9 implementation, all systems, application classes and ahead-of-time (AOT) compiled code can be stored in a dynamic class cache in shared memory. - JDK-8198565: Extend CDS to Support the Module Path
- by Calvin Cheung (2018-02-22)
In JDK 11, CDS has been improved to support archiving classes from the module path.
- JEP 310: Application Class-Data Sharing
- by Ioi Lam (2017-08-08)
To improve startup and footprint, AppCDS extends the existing CDS feature to allow application classes to be placed in the shared archive.
- JEP 250: Store Interned Strings in CDS Archives
- by Jiangli Zhou (2014-09-24)
Interned strings are now stored in CDS archives.
- IBM Developer: Class sharing
- by Ben Corrie (2006-05-30)
The IBM implementation of the 5.0 JVM allows all system and application classes to be stored in a persistent dynamic class cache in shared memory.