GraalVM 22.0, released on January 24, supports JDK 11 and JDK 17, the latest long-term support releases of Java. This new version of GraalVM can be downloaded from GitHub in its Community Edition, while Enterprise builds are available through Oracle. The primary focus of this release is on enhancing GraalVM’s Native Image technology, which compiles Java code ahead-of-time into stand-alone executables, supporting multiple programming languages.
One significant improvement in GraalVM 22.0 is the reduction in image size. The developers have introduced a more compressed encoding method for stack frame metadata, leading to smaller executable images. For users of GraalVM Enterprise Edition, further optimizations include an advanced implementation of String.format()
, which allows localization classes to be made unreachable, thus significantly reducing the image size.
Additionally, GraalVM 22.0 introduces changes to the build output process for Native Image. The new version breaks down the build process into stages and provides a visual representation of each stage. This includes detailed code and heap breakdowns, as well as statistics of the build, making it easier for developers to track and understand the build process.
The Native Build Tools technology has also been updated with better integration with the native agent, improving the overall build process. These updates aim to streamline development and provide more efficient tools for managing native images.
Another noteworthy change in GraalVM 22.0 is the update to the compiler’s treatment of profiling information. The compiler, which functions as an optimizing JIT compiler, can now switch to an AOT (ahead-of-time) mode. This adjustment allows for major optimizations even in the absence of profiling data, benefiting Truffle languages where unprofiled patterns may become hot, as well as Native Image scenarios without profile-guided optimizations.
Overall, GraalVM 22.0 represents a significant step forward in improving developer productivity and experience, with a strong emphasis on reducing build times, optimizing memory usage, and enhancing the Native Image technology.