Open navarro41yt opened 1 month ago
Thank you for digging into it.
Sadly it's not happening to me with this code :/
In my case, after restarting extension host for whatever reason one core of vscode plugin hosts keeps 100% forever. Very annoying, tbh.
EDIT: seems not to be related to php tools, sorry for false positive (turns out it was the phpstan vscode extension, swordev/phpstan)
Have you seen what's the name of the process causing it?
I'm also experiencing this issue, which seems related to the devsense.php.ls
command.
It essentially makes my VS Code unusable, as the PHP IntelliSense freezes. I cannot navigate to files through Ctrl + click, and there is no auto-completion.
Most of the time, it sits at 99 or 100%, but everything still works as expected. But a few times a day, it jumps to a crazy high CPU usage, like 1,300%+, as below.
Output of sudo htop
It's hard to pinpoint what is causing the issue, e.g. a specific piece of code, the number of files open, etc. What are your recommended steps to help troubleshoot this, @jakubmisek ?
I use this extension (free version) for all my open php projects. One day ago I got an issue, my CPU was 100% workload. When I opened the Task Manager there it was,
devsense.php.ls
consuming nearly the 100% of the CPU.I didn't encounter a solution so y ended up using other extensions. Finally i returned to this extension and everything looked good, but in 1 file the process would go to 100% and make impossible to program.
I ended up finding what causes this error: Imagine you have this heredoc (ignore the names):
This won't make the process go to 100% but this:
This will make the process go in a loop
I have nothing more to say, if you're reading this because your
devsense.php.ls
is at 100% load you can "fix" it this way, although your method will be larger.