logoalt Hacker News

dioniantoday at 2:59 PM3 repliesview on HN

This is why I use java for long running processes, if i care about a small binary that launches fast, i just use something slower at runtime but faster at startup like python.


Replies

packetlosttoday at 3:03 PM

Python startup time can be pretty abysmal too if you have a lot of imports.

show 1 reply
cogman10today at 4:28 PM

So long as you aren't in a docker container, The openjdk can do fast startup pretty trivially.

There are options to turn on which cause the JVM to save off and reload compiled classes. It pretty massively improves performance.

You can get even faster if you do that plus doing a jlink jvm. But that's more of a pain. The AOT cache is a lot simpler to do.

https://openjdk.org/jeps/514

AlotOfReadingtoday at 3:02 PM

And then you get applications choosing the worst of both worlds, like bazel/blaze.