Project Leyden is an experimental OpenJDK initiative that uses Ahead-of-Time (AOT) compilation caching to speed up Java application startup. Using the early access build (EA2, based on JDK 26), you can generate an AOT cache with the -XX:AOTCacheOutput flag on first run, then reuse it with -XX:AOTCache on subsequent runs. Tests with two Spring Boot apps (one using H2+Liquibase, another using Redis) show roughly 40% faster startup times. While promising, the gains are comparable to CRaC and still fall short of GraalVM native image. The key advantage is that Leyden is intended to eventually ship as part of the standard OpenJDK distribution.

6m read timeFrom piotrminkowski.com
Post cover image
Table of contents
Other ArticlesSource CodePrerequisitesLeyden with Spring Boot ApplicationConclusion
1 Comment

Sort: