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

 

0

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.


 

0

Hi Phenyr,

Thank you for submitting a request on YouTrack: https://youtrack.jetbrains.com/issue/WI-80141. Please follow it for further updates.

0

请先登录再写评论。