4 ms·
The exception doesn’t prove the rule. It’s ridiculous that I have to modify Java VM arguments so IntelliJ can use more ram and actually index my projects. The
by geraldwhen 5y ago
The exception doesn’t prove the rule.
It’s ridiculous that I have to modify Java VM arguments so IntelliJ can use more ram and actually index my projects.
The IDE is great, but Java undoubtedly makes it worse.
- kaba0 5y agoThat’s the fault of jetbrains, not java. They release it with way too old JRE with custom patches and quite shitty default arguments, while it works eons better with no argument at all on an up-to-date jdk, but even more so with the single setting of a low-latency GC, ZGC. The JVM is a beast, why do you think a good deal of all serious web applications run on top of it?
- vishnugupta 5y ago> The JVM is a beast, why do you think a good deal of all serious web applications run on top of it? When I run a Java app-server I'm happy to, in fact it's unwise not to, allocate it the maximum possible RAM the underlying server has. That's because I know for sure JVM is the only thing that's going to be running on a server. On a desktop it's a totally different story. IntelliJ has to compete with other applications for RAM because I'm constantly multi-tasking between browser tabs, Apple Music, Slack app and what not. So allocating RAM to JVM apps on desktop is a world of pain because I, as a desktop user, just don't (want to) know how to fine-tune hardware resources for different apps. I don't allocate heap to Safari, why should it be the case with IntelliJ? Why can't they figure out? Or maybe there should be a desktop version/mode of JVM that'll figure out ideal RAM size and work with it and expand/shrink as needed?
- nyanpasu64 5y agoMinecraft on modern JVMs still requires setting memory usage based on how much free RAM you have (though not GC tuning to the same extent as before).
- lmm 5y ago> The JVM is a beast, why do you think a good deal of all serious web applications run on top of it? The JVM sacrifices latency for throughput, which is good for servers but not for desktops.
- kaba0 5y agoLook at ZGC GC. It has less latency due to stop-the-words than what the OS scheduler causes. (Of course at the price of throughput). But also the default GC, while on default being more throughput preferring can be tuned by a single paramater.
- lmm 5y ago> Look at ZGC GC. I did, it caused huge pauses with my application (I think probably a bug). > But also the default GC, while on default being more throughput preferring can be tuned by a single paramater. Sure, but how many people will do even that much tuning? Defaults are important, and IMO Java chooses a bad one; responsive by default and tuneable when you need maximum throughput is better than the reverse. (I suspect they picked the defaults they did to be competitive against C++ in benchmarks, but we're well past the time where that's what you're competing with). Same as how Go and Electron have been very successful - not because they're great to work in per se, but because they have so much less friction between writing a hello world program and getting an executable you can distribute.
- kaba0 5y agoThat’s not how it works. It’s not like Java’s GCs in the last decade had any sort of huge pauses unless the program did some stupid shit like allocation in a hot loop. (G1GC, the default since 9 promises by default a 10ms max pause time and it can uphold that under crazy conditions even — and even after that it will get progressively slower instead of a huge increase) Java’s GCs are the state of the art, if they struggle with a workload then it is pretty much guaranteed that other GCs have already broken down completely at the fraction of that. Regarding your application, did you check how many objects have you allocated? VisualVM and the like can show you precisely the statistics of your allocations.