←back to thread

257 points pmig | 1 comments | | HN request time: 0s | source
Show context
pseudoramble ◴[] No.43096211[source]
I’ve been out of the Java scene for a really long time, but will be coming back to it soon. I’m curious - these performance issues described here, are they inherit to how Java itself? Is it baggage from Spring/Boot? Are there ways to get more bang for the buck with some careful choices in a system like this?

The closest I’ve done to Java recently is C#, which I think may have similar challenges, but overall didn’t seem quite as bad if you avoided lots of framework extras. It also wasn’t something I was digging into deeply though, so perhaps I’m mistaken.

replies(6): >>43096295 #>>43096314 #>>43096318 #>>43096420 #>>43096427 #>>43100389 #
gred ◴[] No.43096318[source]
My experience with very simple Jersey web apps is ~1.5 seconds to start up. Much less than his reported ~8 seconds with Spring Boot, but still not in the 100 ms range he reports with Go. I assume one second or so is about as low as you can go with a mainstream Java framework without AOT, though I'd be happy to be corrected.
replies(3): >>43096340 #>>43096666 #>>43100143 #
maccard ◴[] No.43096340[source]
I worked on an app in kotlin a while back, and am currently working in a dotnet app. We can run our entire unit test suite faster than the JVM started up on that project.

Also, 8 seconds is quick in my experience for Java - I’ve seen more like 15-30

replies(1): >>43097789 #
winrid ◴[] No.43097789[source]
The JVM starts in milliseconds

Probably you're loading many thousands of classes...

replies(1): >>43099782 #
mrkeen ◴[] No.43099782[source]
It certainly tells me it does. i can hit 'run unit test', sit back in my chair and zone out for 5 seconds, then come back and read that the test took 22ms.
replies(3): >>43099847 #>>43099922 #>>43100197 #
1. maccard ◴[] No.43099847{4}[source]
Yeah that’s been my experience too.