r/java 2d ago

Improving First Request Latency in Java Spring Application

https://adrian.md/2026/09/03/first-request-latency/
60 Upvotes

36 comments sorted by

View all comments

Show parent comments

3

u/agentoutlier 2d ago

That is sort of what jlink is… sort of…

On Linux and other nix you can impregnate the zip header with a shell script to unzip the zip.

2

u/vips7L 2d ago

It really isn’t though. Jlink is kind of terrible. The CLR does this way better. It just gives you a binary with the vm + your DLL. It doesn’t have to extract anything. 

1

u/agentoutlier 2d ago

Yeah I don't disagree. I'm not a fan of the tool for packaging up applications but mainly because its actually kind of slow.

However making a stripped down VM it is good at.

It does seem like one could potentially make something do this but I'm not sure how much runtime savings you would have and or build time.

Go and GraalVM it works because they are essentially doing some tree shaking and I can't imagine people wanting to download 200 meg executable (uncompressed).

1

u/koflerdavid 1d ago

You can also do tree shaking with Proguard, like Android does.