5 ms·
I know it's not the main purpose of this post, but does anyone here have any singularly powerful steps they took to improve performance on a JetBrains IDE after
by lr4444lr 6y ago
I know it's not the main purpose of this post, but does anyone here have any singularly powerful steps they took to improve performance on a JetBrains IDE after picking the low hanging fruit of the Java heap size and disabling unused plugins? Especially when running the debugger? (Using PyCharm specifically)
- rubyn00bie 6y agoYes, actually. Two things to change to (likely) boost your JVM+IntelliJ performance: 1. Use the new ZGC garbage collector. -XX:+UnlockExperimentalVMOptions -XX:+UseZGC 2. If you're using ZGC, it is fucking imperative you do not use compressed pointers. It will totally hose your system and you'll see unbelievable RAM thrashing (800mb to 16gb and back again within a few hundred milliseconds in one smallish project I have [and thats on a 5950x]). That is to say, after enabling ZGC, ensure you do NOT have the following configuration line: -XX:+UseCompressedOops I've been using ZGC for a few days and I have to say it's been fucking great. Before I'd get really long hangs due to GC; or eventually the editor would grind to a halt (after like 8 hours of usage). I've had the editor open for at least 48 hours now and it's just as fast as it was when I originally opened it.
- andrewaylett 6y agoSomewhat unfortunately, I just tried that (on Mac, latest CLion) and it didn't work. I edited the `vmoptions` file to remove `-XX:+UseConcMarkSweepGC` and `-XX:+UseCompressedOops`, added `-XX:+UnlockExperimentalVMOptions` and `-XX:+UseZGC`, and the IDE failed to start until I restored the original file content.
- dantiberian 6y agoA big one is to make sure you’re excluding directories that you don’t want indexed.
- bpodgursky 6y agoThis is a huge one. If PyCharm is indexing one of your PyPi or NPM caches, the memory footprint dwarfs your active code by orders of magnitude.
- cmrdporcupine 6y agoOne thing I've noticed is that CLion seems to at least partially index things in the directory tree even if they're in your excluded set. Seems like a bug, but I gave up fighting with it, and I gave up trying to get the Chromium source tree to be workable in CLion at all, even on a 48-core Xeon with 256GB of RAM (not joking). But my coworker had some success by creating a second directory which was just symlinks for the code he was interested in, and opening CLion on that. Painful, but worked, kinda.
- lr4444lr 6y agoThanks. I had done this a while ago and rechecked it. Found a couple of new ones, but nothing major. I'm thinking of abandoning PyCharm altogether. Was really using it mostly for it's great debugger, since I had such a good experience with IDEA, but there's only so much slowness, hanging, and system resource hogging I'll put up with. Maybe it has to do to some degree with the type inference demands of Python. Gonna give Eclipse with PyDev a whirl this weekend.
- oandrew 6y agoMake sure you're using the latest JB SDK. https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under https://intellij-support.jetbrains.com/hc/en-us/articles/206...
- pjmlp 6y agoWell, two Java features of modern toolchains (previously only available in 3rd party commercial JDKs) would be to take advantage of native images and JIT caches between runs. Then there are the possible uses of G1 and Shenandoah. This just in the context of OpenJDK, other implementations have their own JIT, AOT and GC variations to choose from. So running on latest versions of a JDK already helps. Me personally, I am happier using Eclipse and Netbeans anyway.
- cdmckay 6y agoDoesn’t IntelliJ use its own bundled JRE? If that’s the case, it won’t matter which JRE you have installed.
- pjmlp 6y agoJRE are gone as of Java 9 actually, replaced by application custom images produced via jlink. You can still get JRE, but they aren't as official as they used to be until Java 8. And in any case, customization flags for which GC to use, or JIT caches, are part of any Java runtime implementation.
- vishwajeetv 6y agoIncreasing min RAM from VMOptions.
- deleted 6y ago[deleted]
- hangtwenty 6y agoTwo bandaids that have helped me: - On a large file, or in a slow project, put the Inspection Level down a notch. (You can get to it from the Actions keyboard shortcut.) You can nudge it back up, including for whatever big file -- when needed. - Install the plug-in "Automatic Power Saver," which does that automatically upon loss of focus. (Well, maybe down two notches?) I do notice the switch/transition sometimes but it makes my overall session so much smoother (mainly because browser and IDE aren't being slower than their combined slowness) p.s. I've been dealing with JetBrains IDEs' slowness for 5+ years, have done the same workarounds you mentioned etc. I always have another fast editor set up, lately VS Code. For quick edits etc. I had a coworker who would use their JetBrains IDE only for the last stretch of their branch or ticket -- to get the inspections and other tools. I supposed I picked this up from them.
- DoctorNick 6y agoyeah, stop using python