Oh Yeah,
That went and drove me nuts. I would like to share what worked for me.
I am a Windows user so the instructions you see in this post apply to windows user, but stuff shall be quite similar for Mac/Linux users too.
First thing first start using Java 64 bit to get some instant performance gain. Set your default environment path for java to point to your 64 bit install. Variables such as JAVA_HOME etc I mean.
Second thing is to then start using PHPStorm 64 bit. Where do you find it? Depends where you installed it basically. On my system it is located as shown in the screenshot below
Third thing, make sure you are on latest version of PHP storm, WebStorm, IntelliJ whatever, all pretty much based on same core code I would assume.
Wait wait… one more thing before you double click that file to launch your IDE is to edit that PHPStorm64.exe.vmoptions this file is found in the same location as your phpstorm exe, What is this stuff? Read more about vmoptions tuning on PHPStorm site, basically all properties in this file are meant to tune your Java Virtual Machine so it handles PHPStorm stuff better. I won’t go into much detail on each property and what it means. You can read all that stuff from oracle website. Here is the link
http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
But I want to highlight one thing, the settings that made my PHPstorm good enough to work with it again.
Here is my snapshot of vmoptions file
1 2 3 4 5 6 7 8 9 10 11 12 |
-Xms128m -Xmx750m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=225m -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+UseCodeCacheFlushing -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -Dawt.useSystemAAFontSettings=lcd -Dawt.java2d.opengl=true |
My problem was made worse by font rendering issue that Java has, thus settings
-Dawt.useSystemAAFontSettings=lcd
-Dawt.java2d.opengl=true ;<– we are just enabling Java2D OpenGL Hardware Acceleration here so to speed up
You can also enable xrender setting to see if that helps, here is my updated vmoptions file.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
-Xms128m -Xmx750m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=225m -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+UseCodeCacheFlushing -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -Dawt.useSystemAAFontSettings=lcd -Dawt.java2d.opengl=true -Dsun.java2d.xrender=true |
You should tune Java heaps and cache settings depending on your project. Higher values can only make things worse in most cases. Google around to see what heap size and cache size you should set for optimal performance.
Hopefully this sort your issues. But don’t hold back if something else worked for you, share your thoughts if I made a mistake in this write up.
Cheers
Thank you so much for this informative post, you saved my day !!!!!
Awesome! It works like a charm
I suggest to try Codelobster: codelobster.com
It works much faster
will check that out. thanks.