Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension causes high cpu load #205

Open
melston opened this issue Aug 1, 2021 · 8 comments
Open

Extension causes high cpu load #205

melston opened this issue Aug 1, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@melston
Copy link

melston commented Aug 1, 2021

  • 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

elmTooling.elm-ls-vscode-unresponsive.cpuprofile.txt

@razzeee razzeee added the bug Something isn't working label Sep 17, 2021
@gardspirito
Copy link

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:
bildo

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.

@geraldus
Copy link

Снимок экрана 2022-01-20 в 1 20 43 PM

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.

@MaicolBen
Copy link

Any update on this?

@razzeee
Copy link
Member

razzeee commented Jun 1, 2022

I don't think this is actionable with the reports we have so far, as it's not reproduce-able from the info provided.

@andreacfromtheapp
Copy link

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 :)

@razzeee
Copy link
Member

razzeee commented Oct 2, 2022

I would suspect some code to trigger this, but commenting stuff out and trying to find it might be hard depending on your source

@MaicolBen
Copy link

In my case (and others) stopped happening when switching to M1, but it seems that didn't happen for @geraldus.

@phollyer
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants