elm-language-client-vscode
elm-language-client-vscode copied to clipboard
Extension causes high cpu load
- Issue Type:
Performance
- Extension Name:
elm-ls-vscode
- Extension Version:
2.2.0
- OS Version:
Windows_NT x64 10.0.19042
- VS Code version:
1.58.2
Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load
I love this extension, but I don't like the fact it sometimes turns my laptop into a helicopter (if judge by sound).
One thing I also found is that besides unresponsive language server, there is another source of high CPU load: rg
ran by the extensions at start. It recursively searches for elm.json
files in the project folder, causing up to 1200% CPU load on my computer. So, this what happens when I open ~/
via Visual Studio Code:
I guess some kind of recursion limit must be introduced in order to stop extension from searching for nonexistent elm.json
in folder with a huge number of files.
![Снимок экрана 2022-01-20 в 1 20 43 PM](https://user-images.githubusercontent.com/744471/150300107-6a3da226-300e-40ed-afae-ef07999a8510.png)
Facing a similar issue on macOS Monterey. My Apple M1 laptop becomes hot when editing Elm files in VSCode. System Monitor shows 100% CPU load on Electron process, and if I inspect details I see that this process works with Elm project.
Any update on this?
I don't think this is actionable with the reports we have so far, as it's not reproduce-able from the info provided.
FWIW, this is happening to me as well. It only started recently. I can try to provide as many details as possible, if requested. I would not know where to look, as my configuration basically hasn't changed. please and thank you :)
I would suspect some code to trigger this, but commenting stuff out and trying to find it might be hard depending on your source
In my case (and others) stopped happening when switching to M1, but it seems that didn't happen for @geraldus.
Don't know if this is the exact same issue, but I'm also getting high CPU load when my modules become large (can't define large at the moment) and is related to elm formatter taking an age to run.
@razzeee I'll investigate further when I have the time, and if this is a separate issue let me know and I'll start a new issue when I have more information.