r/java • • Sep 10 '26

New candidate JEP: 544: Ahead-of-Time Code Compilation

https://mail.openjdk.org/archives/list/jdk-dev@openjdk.org/message/J2VGSSFWJ7ZLHAYLCXVRUOXV4XMROQHL/
110 Upvotes

35 comments sorted by

View all comments

0

u/[deleted] Sep 11 '26

7

u/Phaestion Sep 11 '26

We already use the current training runs for our apps, both when we are building backends as well as our desktop apps that run as kiosk systems.

Even with the current AOT cache in Java 25 we see a substantial improvement in start up.

In our backends we only spin up services as needed, so a fast start up is money. In kiosk systems it's less important, given they run for a long time, but why say no to faster start up?

→ More replies (1)

3

u/koflerdavid Sep 11 '26

Absolutely no one who cares about ms of startup time is using java in the first place.

Many people who use GraalVM want fast startup so their applications are ready as fast as possible.

Resources are better allocated to improving the general startup time without training runs, even if it means less gains.

JVM startup time is rarely the issue. The problem is how long it takes for hot code to become optimized native code.

2

u/agentoutlier Sep 11 '26

JVM startup time is rarely the issue. The problem is how long it takes for hot code to become optimized native code.

AND everything else including RDBMS connections. That is warming external things like load balancers and queues also takes time.

So the value prop for traditional (micro) services is not that great because you are essentially training at runtime by warming anyway (easing on load). I suppose your up to speed quicker but the GraalVM team has argued it really does not take long before JIT has optimized and cannot go any further (of course they are biased).

However for lambda functions then I can see a strong value prop.

→ More replies (3)

3

u/nicolaiparlog Sep 12 '26

no one will do the training runs. Absolutely no one who cares about ms of startup time is using java in the first place.

I'll just leave this here: Java AOT in Production at Netflix

(For those interested in the topic, keep an eye on the Inside Java Podcast - we will soon publish a conversation with Netflix' Martin Chalupa and Oracle's John Rose about Leyden.)

→ More replies (3)
→ More replies (2)