logoalt Hacker News

HendrikHensentoday at 7:30 AM3 repliesview on HN

I think there is something to say for compiling to native code, having binaries in the ~25 MiB range, being able to run in distroless containers, being able to run a web application with less than 100MiB of memory and startup times measured in milliseconds rather than seconds (sometimes dozens of seconds).

Don't get me wrong, I like Java and don't very much like the Go language. But Java has a lot to improve upon still.


Replies

gf000today at 7:58 AM

Small java programs start up well in the milliseconds.

I don't really think it's fair to compare some old jboss monstrosity doing the job of a whole kubernetes cluster to a dumb hello world server written in go.

Sure, java startup time is and will probably always be worse than putting everything into a single binary - but it is way overblown in many discussions. I have a bunch of Quarkus services on my home server and they start up immediately.

lenkitetoday at 12:33 PM

You can have a <20MiB Graal-compiled binary for a Java project if you use a lean framework like Micronaut. Memory footprint is 5–40 MB RSS.

show 1 reply
ludovicianultoday at 9:59 AM

With Quarkus (and other new frameworks) you can have webapps with less than 100MiB. Startup times in a couple of miliseconds. CLI apps, with limited number of third party libraries are under 40-50MiBs.