Totally unusable PhpStorm CPU usage
Hi,
Today I haven't been able to work because phpStorm (2024.3.1 with no plugin) has became totally unusable.
As soon as I am writing anything (even a space) the cpu usage jump to 100% and the IDE is freezing.
I have tried to:
- invalidate cache
- restart computer
- update to latest (2024.3.1.1)
- uninstall and go back to previous release (2024.2.5)
- reset settings to default
Activity monitor just show a big number like 800-1900 on Process total CPU Usage. Then, the second is always php.lang.psi.resolve.types with a number of 400-1200 then jdk.internal.misc lower (the rest is not significant).
Nothing work, I couldn't get any work done all day.
I have never seen this in 10 phpStorm years usage, I can't lose more time…
What can I do to solve this kind of problem?
Best regards,
Rémi
请先登录再写评论。
Ok, after some testing, I found this behaviour come from specific lines of code.
I am not 100% sure of what lines of code but I think phpStorm become totally crazy and absolutely unusable (100% CPU and heavy load on any character typed) when we use too many nested anonymous functions (6 in my case).
But it's not just that.
It's seems we need some kind of loop to break phpStorm.
Ie:
$contractFilterFct = fn($q) => $contractFilterFct($q)->whereIn('contract.type', $value);
$contractFilterFct = fn($q) => $contractFilterFct($q)->whereIn('contract.type', $value);
$contractFilterFct = fn($q) => $contractFilterFct($q)->whereIn('contract.type', $value);
$contractFilterFct = fn($q) => $contractFilterFct($q)->whereIn('contract.type', $value);
$contractFilterFct = fn($q) => $contractFilterFct($q)->whereIn('contract.type', $value);
Won't break anything.
But :
foreach ($filters as $filter) {
$contractFilterFct = fn($q) => $contractFilterFct($q)->whereIn('contract.type', $value);
$contractFilterFct = fn($q) => $contractFilterFct($q)->whereIn('contract.type', $value);
$contractFilterFct = fn($q) => $contractFilterFct($q)->whereIn('contract.type', $value);
$contractFilterFct = fn($q) => $contractFilterFct($q)->whereIn('contract.type', $value);
$contractFilterFct = fn($q) => $contractFilterFct($q)->whereIn('contract.type', $value);
$contractFilterFct = fn($q) => $contractFilterFct($q)->whereIn('contract.type', $value);
}
And CPU start to reach 100%
Add a switch case + some other stuff and we can reach a total freeze as soon as we open phpStorm on this specific php file.
Hi Phenyr,
Thank you for submitting a request on YouTrack: https://youtrack.jetbrains.com/issue/WI-80141. Please follow it for further updates.
Hi Anastasiia
It seems that the issue does not exist? Or is it only available to the author?
I want to track it and help upvote it as phpstorm has become more and more useless on my Thinkpad Carbon X1 gen9. It used to run fine.
On the youtrack WI-80141 (I still can access it) at least 1 other user (Vasiliy Yur) confirmed the issue.
He also says this:
“I can confirm this issue on some older builds that I have tried (2024.3.5, 2024.2.1), but also I can state that this issue is fixed in 2025.1.4.1 and the latest 2025.2.”
He added, if it would help you (I don't know if you have the same kind of problem). :
"Surely, I understand that you cannot install these versions at the moment, so the only workaround that I may suggest now is to disable the bundled "Psalm" plugin; that should help, at least, with the attached code sample."
Hi Rs,
This issue indeed has limited visibility on YouTrack. However, as Phenyr has already summarized, the issue is not reproduced with the 2025.2 version on our side.
If you encounter issues with the 2025.2 version of PhpStorm, please consider submitting a new bug report, as it may have different root cause.
Having the same issue with the latest build.
PhpStorm is totally unusable with 1000% CPU load
Hello Denisov1985,
It would be great if you could submit a separate issue using Help > Contact Support in the IDE. Please include logs collected via Help | Collect Logs and Diagnostic Data, as the root cause of the issue is highly likely different in your case.
Confirm, even without indexing! ~300% CPU usage
Each next version becomes worse and worse
Hi Mushketer888,
Please submit a separate request via Help > Contact Support and attach the IDE logs from Help | Collect Logs and Diagnostic Data so we can determine the cause of this behaviour.
this latest update is trash 100% cpu usage and all that the support can do is ask for some logs, you dont need logs just open stupid software and you will see it, its impossible to work now, even with window down no ongoing indexing phpstorm has random spikes to 100% and it freezes pc. tried to invalidate caches nothing helps here. How is it spiking while you dont do anything what sort of background processes are you running? fix it ASAP as this drives me mad.
not even indexing, randomly
I have increased Java heap memory size to ~3GB and issue seemed to be gone
I have given up trying to work, basically. On an M2 Pro, which should be plenty for this. I can't even scroll in a file or open menus because the lag is so bad.
I've disabled every plugin I don't use, disabled all AI features/code completion, increased VM memory to 4GB and it still literally cannot be used at all.
This is on 2025.2.4 on macOS, ARM.
Hello Nickdnk,
Please also submit a request to support and share logs from Help | Collect Logs and Diagnostic Data for the investigation.