Hacker News new | ask | show | jobs
by alangpierce 3492 days ago
I use PyCharm and WebStorm regularly without having persistent high CPU usage, although I've seen other people run into it.

Maybe you've already tried this, but one thing that I've found is that the JVM heap size is sometimes set too low, especially when working in a large project. You enable the memory indicator in the bottom right ("Window: Show Memory Indicator" from the Cmd+Shift+A menu) to see the current and max memory usage, and you can click it to manually trigger a GC. If your heap is too low, you'll GC a lot, which can easily cause CPU spikes.

There are details on how to set the heap size here: https://www.jetbrains.com/help/pycharm/2016.2/tuning-pycharm... . But the short version is that (on Mac) I made a pycharm.vmoptions file at ~/Library/Preferences/PyCharm2016.3/pycharm.vmoptions and it includes the line "-Xmx3000m", which sets the heap size to 3GB.

1 comments

I've literally tried changing all the JVM settings to be higher and it has zero effect.