So, I’ve been working with JetBrains PhpStorm for about 6 months or so now. Only recently have I started forcing myself to serious work with it. Part of the reason why I used tabbed terminals and VIM for so many years is that it is very fast. No mouse clicking, my hands never need to leave the keyboard except to test what I’ve just written in a browser.
PhpStorm is a Java app, and insanely powerful. With that power comes a great deal of complexity, though, and a whole lot of lag. Lag to the point where the increased productivity almost isn’t worth it and it would almost be faster to just go back to terminals and VIM. The font rendering problems with Java under Linux also made things less than desirable.
After reading through the slides of the Approaching Zero Driver Overhead presentation given by NVIDIA, AMD, and Intel about OpenGL at this years GDC, I stumbled across the Java VM setting for rendering via OpenGL. So, I enabled OpenGL rendering in PhpStorm.
What a difference that made. I no longer feel like I’m slogging through things waiting for the editor to keep up with me. Switching tabs is almost instantaneous now, as is scrolling through long source files. In one of my projects, one of the source files is just under 5000 lines long. For PHP code, thats fairly large for a single file. I dreaded having to work in that file since scrolling through it was painfully slow. With the OpenGL rendering, its almost as fast as editing it in VIM.
One thing that I’m sure makes a difference here, though. I am running a fairly powerful GPU, an MSI N460GTX Cyclone. While mediocre by today’s standards, a few years ago when I bought it it was one of the best GPU’s for the money. I pulled it out of my gaming system about a year and a half ago and put it into my work system to give it a nice little boost. This is under Xubuntu 13.10 and the latest proprietary Nvidia drivers.
My phpstorm64.vmoptions file now looks like this:
1 2 3 4 5 6 7 8 9 10 11 12 |
-Xms128m -Xmx750m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=96m -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+UseCodeCacheFlushing -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -Dawt.useSystemAAFontSettings=lcd -Dawt.java2d.opengl=true |
The last two lines are the only ones I changed from the defaults. Those two changes make PhpStorm quite tolerable for me to work in now.
Thank you so much!! I was about to go back to Sublime.
Thank you !!! You saved me :=)
Yes!!!! Thank you so much for this. I was about to kill myself never mind switch everything to another program
I use you code but when I restart my phpStorm it shows me “Faild to creat JVM” message..
If I were to guess, I would say that your Java installation or window manager doesn’t support OpenGL.
This really made the change from OK to great. The editor can now keep up with my typing speed. Thanks.
I know this post is old, but just wanted to say you literally saved my hair from being pulled out. I was trying other IDEs because Webstorm was getting so slow to work within my massive project. This worked a charm. Thank you!