Get the latest tech news

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


In the "Let’s Take a Look at…​!" blog series I am exploring interesting projects, developments and technologies in the data and streaming space. This can be KIPs and FLIPs, open-source projects, services, relevant improvements to Java and the JVM, and more. The idea is to get some hands-on experience, learn about potential use cases and applications, and understand the trade-offs involved. If you think there’s a specific subject I should take a look at, let me know in the comments below. Java 24 got released last week, and what a meaty release it is: more than twenty Java Enhancement Proposals (JEPs) have been shipped, including highlights such as compact object headers (JEP 450, I hope to spend some time diving into that one some time soon), a new class-file API (JEP 484), and more flexible constructor bodies (JEP 492, third preview). One other JEP which might fly a bit under the radar is JEP 483 ("Ahead-of-Time Class Loading & Linking"). It promises to reduce the start-up time of Java applications without requiring any modifications to the application itself, what’s not to be liked about that? Let’s take a closer look!

1 The EXTRA_ARGS variable can be used to pass any additional arguments to the JVM when launching Kafka, in this case to specify that the list of classes for the AOT cache should be recorded in the file kafka.aotconf It may be a good idea to monitor which classes get loaded via JDK Flight Recorder, thus making sure you are indeed capturing the relevant set when creating the AOT cache file. Finally, I’ve also measured how long it takes to start the Kafka native binary in a Docker container (see KIP 974), which took 118 ms, i.e. less than half of the time it took with the AOT cache.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Time

Time

Photo of Look

Look

Photo of JEP

JEP

Related news:

News photo

Odd Lots: The Last Time Tech Investors Were So Excited (Podcast)

News photo

The Last Time Investors Really Got Excited for Tech Infrastructure

News photo

Dragon Quest 1 & 2 HD-2D Remake gets first look at gameplay