I've been struggling lately with PhpStorm IDE, specially when closing a big project and opening another big one, where sometimes it just hanged (if you are doing Drupal, any Drupal project might fall in this category given the amount of files).
After checking settings, I found out that I had the defaults, while my computer has 32Gb of RAM.
If you want to play around with the options to see if it improves your experience, go to Help > Edit custom VM options....
It will open phpstorm64.exe.vmoptions
where you can customize the VM options. It's important that you save the location of this file, as if your experimenting breaks PhpStorm, you want to be able to edit this outside of it.
I ended up with
-Xms4G
-Xmx8G
-Dawt.useSystemAAFontSettings=lcd
-Dawt.java2d.opengl=true
-XX:ReservedCodeCacheSize=1G
-XX:+AggressiveOpts
-XX:+UseFastAccessorMethods
-XX:+UseStringCache
-XX:+UseCompressedOops
-XX:+UseCompressedStrings
and so far looks like it's working better.
UPDATE: das-peter pointed out about ulimit too for allowed open files. I remember having set up that before because my hard ulimit command inside WSL2 shows:
$ ulimit -H -n
1048576
You can set that with
$ ulimit -n 1048576
Comments