4 ms·
I don't think the need is that larger when compared to today's applications, esp. Electron based applications. Eclipse still uses less resources than VSCode/At
by bayindirh 5y ago
I don't think the need is that larger when compared to today's applications, esp. Electron based applications.
Eclipse still uses less resources than VSCode/Atom while juggling more balls at the same time.
- oriolid 5y agoJust 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.
- acdha 5y agoAtom, yes, VSCode, no. The latter is noticeably faster and uses less RAM — and the JetBrains suite is even worse. A large part of this is cultural. The Java world has been prone to high complexity styles which are hard to optimize and there doesn’t appear to be much social expectation that you profile or improve code until you max out what you can easily fit on a single system.
- kaba0 5y agoJetbrains’ IDEs do more things by an order of magnitude than a vscode full-of-plugins, so it is not a fair comparison.
- acdha 5y agoFar less than an order of magnitude — and it shouldn’t be the case that every advanced feature slows down core functionality like how long it takes for a key press to render when you’re not even using that feature. They have lots of functionality but proponents have always noted the … stately … speed and these days the ones I know have moved to VSC because it’s competitive for the features they use and they benefit from better performance all of the time.
- kaba0 5y agoYou still can’t really conclude that it is due to Java somehow. Also, if jetbrains would finally use a non-deprecated GC and a slightly more GC-friendly max heap setting, intellij would have much better latency. (You can try this out yourselves, just go with G1GC and increase heap size for a good improvement. But the best experience would come from ZGC but it is only available in a newer runtime than the bundled 11)
- acdha 5y agoDefinitely, but when almost every Java program I use has issues with performance and memory it suggests that the culture doesn’t value those things highly enough. The same is often true in the JavaScript world, which makes VSC interesting because it’s famously an outlier in the Electron world.