Initialization code that never got trained
María Arias de Reyna Dominguez
mariasde at redhat.com
Tue Dec 30 09:12:58 UTC 2025
Happy New Year!
I have been doing some experiments with Leyden and realized something:
there is some code at startup/initialization that never gets optimized but
is impacting on startup and warmup time.
This was a realization while doing comparisons with native/graalvm images
of the same code.
For example: a REST API. It has some initialization, port opening, reading
configurations, etc... that run only once. So the code will never be
trained. But it always runs at startup, impacting the time to first
response.
Compared to a native image, the native image may not have it optimized, but
at least it is already compiled, not interpreted. Therefore, the native
image starts faster.
So, how can I tell Leyden to please compile and cache those functions, even
if they are going to be run just once, even if they are not optimized at
all, even if those compilations can get discarded after a couple of seconds?
Or are we just going to assume that that code, which is impacting startup
time, doesn't need to be pre-compiled because we are focusing only on
optimizations made by the JVM on runtime?
Kind regards,
María Arias de Reyna Domínguez
Senior Software Engineer
She / Her / Hers
ariasdereyna at redhat.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/leyden-dev/attachments/20251230/34ae50ef/attachment.htm>
More information about the leyden-dev
mailing list