Closed iyashpal closed 2 years ago
For some reason, this happens to me for some PHP files... the only way to stop is to close Visual Studio Code and then kill all the "php" processes running on Windows.
I haven't figured out yet what causes this, but it definitely happens more frequently in specific (100% valid) PHP scripts.
Any update on this?
I have noticed phpcs check runs for every error in page. I don't know why but i think this extension runs phpcs in a loop and checks only one error at a time.
I think it should run once every save or with a timeout of 5 sec when stop typing for the entire page. It should reduce CPU overload.
@Kwaadpepper I moved to "wongjn.php-sniffer", and I'm very happy with that one.
Config I have:
"phpSniffer.run": "onSave",
"phpSniffer.executablesFolder": "........\\Composer\\vendor\\bin\\",
"phpSniffer.standard": "......\\phpcs.xml",
"phpSniffer.windowsHardkill": true,
"phpSniffer.windowsPhpCli": "php.exe",
They have: ""phpSniffer.windowsHardkill": true,"
Hey thanks for the info :)
As for me i'm using https://github.com/shevaua/vscode-phpcs now It's a fork from this one.
It has a queue buffer and more options like disable on type check It has way better performances.
Awesome! And I assume that fork fixed the high CPU issue? I'm happy with the one I have now, but good to know there are more options!
Well i could not say if it works really well on a low end machine as mine is a powerful one. But it seams to work way faster. And the option to make it run on save only makes it ian ideal and universal option.
Maybe if you have a compatible device for this test you could give it a try and print here your impressions ?
I also use this one because i work with WSL as local web server and with linux tools only.
ikappas.phpcs-unresponsive.cpuprofile.txt
Performance
phpcs
1.0.5
Linux x64 4.15.0-45-generic
1.30.2
:warning: Make sure to attach this file from your home-directory:
/home/yashpal/ikappas.phpcs-unresponsive.cpuprofile.txt
:warning:Find more details here: https://github.com/Microsoft/vscode/wiki/Explain:-extension-causes-high-cpu-load
Profile file: ikappas.phpcs-unresponsive.cpuprofile.txt