Slow performance
Hi all,
First of all i'd like to say how brilliant PHPStorm is. It has quickly become my editor of choice!
However, I am having some performance issues and I cant figure out why. I am using a Macbook Pro 2.8GHz Intel Core i7 with 16GB LPDDR3 and Intel HD Graphics 630 1536MB. So the computer, as far as I'm aware, should be quick enough to run this.
When I am using PHPStorm it doesn't take long for it to start to lag. It takes a few seconds to move the cursor or do any typing. When this is happening, I am checking my Activity Monitor and it doesn't look like anything is even close to clipping - so I can't figure out why my computer is lagging so badly!
The issue is fixed as soon as I put PHPStorm into Power Save Mode.
Would someone be kind enough to help my resolve this? Im not sure how to know which background processes are causing this issue.
Many thanks,
Tom
请先登录再写评论。
Please run Help > Collect & Show logs in ... and upload somewhere the resulting archive. We would need to inspect it.
@dmitry : that is the stock answer, but fact of the matter is PhpStorm is a dawg. I have to reindex/restart every 20 minutes or so (same box). Every release gets worse, gets the same stock non-answer from yall, and you keep piling garbage non-features in the build, completely oblivious to this basic problem.
@Tom : i have worked some custom java options to alleviate some of this, you will need to experiment. It is not your puter that is lagging, it is PhPstorm. More and more garbage non-features to be explicitly checked on every keystroke, burdening the index no end. Start by ensuring you have headroom in the JVM memory, then (not sure your java version) try to max out the use of largePages and their memory allocation. As well, be generous on PermSize and MaxPermSize (the storm loads a truckload of classes you will never use).
Also, in custom properties put in
editor.zero.latency.typing=true
There is a rumor that it is now the default option, but i'm not convinced.
Edit: here was an inadmissible comment.
Hi,
Sorry for the late reply. I have had a busy time recently, and began working on a small project which wasn't causing me any issues. However, I have today gone back to one of my larger projects and the issue is apparent once again.
Thank you for your advice both of you. I will start looking into your suggestion now @Yves.
@Dmitry I have attached my logs as asked for. http://www.distinctive-design.co.uk/logs-20170915-125028.zip
Many thanks!
@Tom : have updated to java8, some (many) of my GC settings have become obsolete. Experimenting on my own now, to regain some of the String benefits i used to have, as well as the G1C garbage collector. Will publish when i feel I have some optimizations to propose. Even though (officially at least) largePages is not an osX concept, the kernel does support them, and i would not be surprised that Tim and Larry have got some undocumented thing going :)
Tom, I am surprised that there are no thread dumps in the archive, which basically means that PhpStorm isn't aware of its performance issues.
What is there are tons of VCS related exceptions.
A simple test. Please duplicate the project folder, but remove the .git directory from there, open the newly created folder with PhpStorm and let it finish indexing.
Is it any better?
Hi,
Thanks for the responses.
@Eugene
I have done exactly as you said and it did indeed fix the issue. Well, I have at least been able to work on the project for a good amount of hours with no problems. But as soon as I put the git folder back in the lagging comes back. Why would this be? Or do I just need to disable git for PHPStorm?...
Many thanks
Tom,
It might be related to a numbed of unversioned or uncommited files. Do you have lots of them?
I have to be honest I don't know. Ive always kept my files locally in the past but have recently started using BitBucket. I only do basic pushing and committing, Im not sure exactly about version control. I do always commit changes as they are made, so it shouldn't be due to that.
Excuse my ignorance :-$
I have removed version control from the project and I am still having the same issues. :(
Tom, it would be great if you could capture a CPU snapshot based on this article.
You would need to:
1) enable profiler afent
2) start CPU profiling while reproducing lags/freezes for ~1-3 minutes
3) stop CPU profiling and send us resulting snapshot
@Dmitry
Thank you for your continued support. I have since rebooted my computer and have not yet had the same problem despite working on the project for a couple of days now. It looks promising now. Hopefully that fixed it, although Im not sure why when i did this as soon as I removed Version Control.
Ill check back with the above information if it happens again.
Thank you to everyone :)
Just wanted to say that I had the same problem on PhpStorm 2017.2, and disabling git-plugins and rebooting the computer fixed this issue for me.
I'm experiencing the same issue here, on PHPStorm 2017.3.4, especially when typing some PHP variable, even worse when it's an object and I wait for the auto-suggest list to appear.
The memory indicator says nothing special, mostly betwen 200 and 400 of 725 overall mb.
I have not yet disabled the Git integration plugin, as I quite need that. Instead, I deleted some unversioned 100m csv/sql files and now testing if that helps.
@Ansgar : sorry for asking the obvious ... my general temporary fix for this is to Invalidate caches and restart ... it helps (a lot) for a while. The best bang i got was to 'tune' some JVM parameters (consider using large pages, optimizing string ops, large ReservedCodeCacheSize).
Ok, I just invalidated the caches again, but I think I've done that before.
Also, I updated to PHPStorm 2018.1.
Along with that update, I installed the 32bit JVM from Jetbrains, as I heard my colleague talking about better performance on the 32bit version vs. 64bit.
Will report in a few days if performance is (and stays) better now. If not, then thanks for hint on the JVM parameters.
Hey we are primarily using PHP Storm at my company. Every release, PHP gets slower and slower, even with all of using brand new macs. Now we are having the problem where a lot of our PHP Storm IDEs no longer work, which means our company is wasting money while we can't develop.
I would start complaining about how the fact that PHP Storm's Terminal doesn't have a properly functioning Copy + Paste function but that's for another thread.
C'mon guys, fix this.
@Dmitry - You are telling someone their comment is inadmissable while giving the wrong directions on how to debug them.
"Help > Collect & Show logs in"
Actual Help >
Wording was changed since 2017. Now it is called "Compress Logs and Show in ...", thanks for pointing out.
@Dmitry you dont need these logs, you just need to use your own products ( i mean do stuff, real stuff, with a good code base) : the 'instant crawl' will appear to you in a matter of minutes. I am currently re-indexing every 20 minutes or so in one of my projects.
C'mon guys, fix this. I dread switching IDE, because we are using a bunch of your tools, and the cognitive burden of switching from backend(phpstorm) to mediation layer(webstorm) to frontend (appcode+android studio) is light, not to mention our current 'scripting' investment. But at the end of the day, we may end up dropping macs AND phpstorm all together if we are impeded.
btw: the 'instant crawl' is apparent in all your products (those mentioned above). Could it be a platform issue (IntelliJ) ? lack of capacity to 'nuke out' frill, non-features, to lighten-up your indexing process ? Reworking indexing to have hits based on proximity ? etc ...
@Yves Le Borgne
Our team does use our own products. PhpStorm itself is written in IDEA.
> the 'instant crawl' will appear to you in a matter of minutes. I am currently re-indexing every 20 minutes or so in one of my projects.
I would appreciate if we could fully troubleshoot that: at least please capture a CPU snapshot and share it with us, here's howto: https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems
> lighten-up your indexing process ? Reworking indexing to have hits based on proximity ? etc ...
Our team is constantly working on this. Unfortunately there is really low amount of bug reports on our tracker related to PHP indexing.
But some performance issues are indeed caused by problems in an IDEA platform, e.g. https://youtrack.jetbrains.com/issue/IDEA-207243 or https://youtrack.jetbrains.com/issue/JBR-526.
That's why we have to inspect each & every performance complaint closely.
@Steffy
> . Now we are having the problem where a lot of our PHP Storm IDEs no longer work
Could you please describe this in details? Even better - contact us via Help > Contact Support.
@dmitry
>Our team does use our own products. PhpStorm itself is written in IDEA.
then, you are not really testing PhpStorm. You should devel a substantial project in PhpStorm to really appreciate how much of a dawg it is. Same for AppCode, WebStorm, and AndroidStudio (on that one, thank god, google is mopping up after your mess).
>Our team is constantly working on this. Unfortunately there is really low amount of bug reports on our tracker related to PHP indexing.
All your indexing sucks, not just PhpStorm. If you dont believe me , try a 2000 LOC express project in Webstorm. As for low amount of bugs, the time it takes me to submit a bug report is way too long. I dont have a day-to-waste per sprint to babysit Jetbrains ... For our part, we have contracted a DevOps to mount our next generation dev environment : Ubuntu, no Idea products. FINALLY : when i turn on any kind of Jetbrains thermometer (CPU/memory) , i will be lucky if i can even kill the process ... cuz the medication kills the patient.
Apple, like Jetbrains, has zero regards for developers, and are probably going to suffer from it. For the iOS cr-apps, we will subcontract some low-end devs in 'monkey see/monkey do' mode, to copycat on our Android products. For us, Android 21 is the lowest common denominator moving forward.
If only I could upvote your post 100 times Yves...
>Our team is constantly working on this. Unfortunately there is really low amount of bug reports on our tracker related to PHP indexing.
I was under the impression that the Jetbrains team was aware how shitty the performance is and this is already #1 priority. I believe that this is the #1 reason for users switching to other editors. I've used WebStorm, PhpStorm and other JetBrains IDEs for 5-6 years on 4-5 computers (Windows and Mac, desktop and laptop) and I loved the features they have but Jetbrains IDEs are by far the most demanding and slowest programs I use for development. I have top spec computers but still they are way too slow compared to e.g. VS Code even after applying the optimizations from above