The driving force behind this proposal is the desire to preserve the agility of the Java platform while reducing the cost of maintaining that agility, which must be borne by developers every time they launch a new application, it claims. The Java platform boasts a highly dynamic architecture, featuring equivalents to dynamic class loading, dynamic linkage, and dynamic reflection – capabilities that empower developers with unparalleled expressiveness. Java builders can create libraries that dynamically load and hyperlink to plug-in components at runtime, or compose functions by assembling libraries that hyperlink to various other libraries dynamically. While the JVM’s dynamism is impressive, it exacts a cost: during the startup of a typical server application, the JVM performs extensive work to scan JAR files on disk, load parsed data into class objects, and more. It performs this task on demand, with a sense of relaxation, simplicity, and punctuality. Due to these reasons, large-scale server utilities may take several seconds or even minutes to initiate operations.
The key to reducing startup times lies in completing certain tasks ahead of schedule rather than solely during the actual launch period. The goal is to accelerate startup times by leveraging the insight that many functions typically initiate their processes in a similar fashion each time they are executed. Different targets embrace:
- No modifications are necessary to the existing code.
- The Java application does not require any modification in terms of its launching mechanism via the command line, as it already accepts and processes command-line options passed onto it.
- Not requiring using the
jlink
orjpackage
instruments. - Establishing a foundation for further optimizations, this text also addresses the importance of warm-up time, which enables the HotSpot JVM to fine-tune code for maximum performance.
The ahead-of-time proposal for class-loading and linking follows an earlier proposal for bytecode. The proposed document currently remains in a preliminary, incomplete state.