4 ms·
Just because someone managed to come up with a worse alternative doesn't make Java good. The main problems, initial JIT time and fixed heap size still remain.
by oriolid 5y ago
Just because someone managed to come up with a worse alternative doesn't make Java good. The main problems, initial JIT time and fixed heap size still remain.
- jpgvm 5y agoJava has always been tunable to be more aggressive at returning memory to the OS if you are worried about the resident memory size. Newer versions of Java with the more advanced GCs are even better at it. Ultimately Java's runtime performance wasn't really to blame for it's lack of success but rather the awkwardness of JRE distribution, garbage applet sidetrack and lack of high quality GUI toolkits that actually felt native rather than attempting to do "platform independent look and feel".
- oriolid 5y agoHow does the tuning work? To me it still seems that JVM (or at least the version bundled with JetBrains IDEs) keeps allocating memory until it's near max heap size and it's up to the user to find the value that's large enough stop the app getting stuck doing full GC but leaves memory for other apps.
- bayindirh 5y agoJVM can be tuned via the command line during startup. Eclipse comes with 512MB as the heap size, and you can enable a small gauge to see how it's doing. I've never seen "This heap is small, please give me more space" error from Eclipse. Also, latest versions of Java (starting with 16 IIRC) doesn't grind to halt during large GC passes. I've developed enough applications in Eclipse during past 20 years, and it has become from being an absolute lead ball to something agile for its size, both in macOS and Linux. I've found an infinite loop bug in CDT, and only with that I was able to make JVM throw the towel, and call it quits. JVM is very smart and resilient in memory management, I've seen some stuff during my life.
- jjoonathan 5y agoDefaults are important. The world runs on defaults. Bad defaults cause real problems and take real work to fix, so it's fair to blame software for poor out-of-the-box behavior, even if it can be configured away.
- oriolid 5y agoWell, a message saying "This heap is small, please give me more space" would be all too helpful. I haven't touched Eclipse in years, but Clion and Rider have this failure mode where they just use all the CPU all the time and it's up to user to figure out that it's GC and how to increase the heap size. I was hoping for an option that would mean "use all the memory you need but don't keep the maximum allocated just in case". The current -Xmx seems to be more like "postpone full GC until the maximum has been reached". I'm not sure if it's significant that Jetbrains IDEs and Eclipse are separate products. Google can't distinguish between different Jetbrains products in search results, maybe Eclipse can be lumped into same group by some logic.
- KptMarchewa 5y agoJetbrains IDEs have this "heap is too small" message though.
- oriolid 5y agoI have never had the patience to wait for it.