Hasty Briefsbeta

Bilingual

Let's Take a Look at JEP 483: Ahead-of-Time Class Loading and Linking

a year ago
  • #JEP483
  • #Performance
  • #Java
  • JEP 483 introduces Ahead-of-Time (AOT) Class Loading & Linking to reduce Java application start-up times without code modifications.
  • Part of Project Leyden, JEP 483 builds on Application Class Data Sharing (AppCDS) by also loading and linking classes ahead of time.
  • A training run is required to create an AOT cache file, ensuring all necessary classes are loaded for optimal performance.
  • Testing with Apache Kafka showed a 59% reduction in start-up time using AOT caching.
  • Apache Flink also benefited, with a 51% reduction in time-to-first-message for a simple job.
  • AOT caching is particularly useful for cloud-native scenarios, CLI tools, and testing environments where start-up times matter.
  • GraalVM offers more advanced AOT compilation with faster start-up times but requires code adjustments and lacks Java's dynamism.
  • Project Leyden aims for a middle ground between GraalVM's constraints and Java's full dynamism, with future JEPs planned for AOT compilation and method profiling.