How to Speed Up IntelliJ IDEA / Clion
To disable plugins, open menu
File > Settings > Plugins. Safe candidates for disabling are version control plugins (CVS, Git, Mercurial, Perforce, Subversion, TFS) that you don't use.
Help > Edit Custom VM Options…
Or activate the action menu with
Control + Shift + A. Type
vmoptions and select
Edit Custom VM Options
(Clion VM Options are stored in
Note: Don't edit
.properties files directly on macOS, as it will violate the application signature.
-Xss2m -Xms16g -Xmx31g
Why 31 GB but not larger: because anything larger disables pointer compression optimization, pointer-heavy applications effectively have less usable memory.
To check your memory:
$ lshw -class memory
Remember to delete the line that uses the concurrent marksweep GC
Activate the action menu with
Control + Shift + A
edit custom properties and select
Edit Custom Properties
Or create or edit
~/.CLion*/config/idea.properties and set
idea.system.path to any writable tmpfs, e.g.
- you need to completely reindex every time you restart the IDE
- your logs are also in memory, so if you have other issues they'll be harder to diagnose
To create a ramdisk:
$ mkdir -p /mnt/ram $ mount -t tmpfs tmpfs /mnt/ram -o size=8192M
If you can change your hardware. This is the most effective way to speed up the IDE.
$ lsblk -d -o name,rota NAME ROTA nvme0n1 0
If the ROTA column shows 1, you don't have an SSD