elixir-ls
elixir-ls copied to clipboard
Crippling load when recompiling
Environment
- Elixir & Erlang versions (elixir --version): 1.14.0
- Elixir Language Server version: 0.11.0
- Operating system: macOS 12.5.1
- Editor or IDE name (e.g. Emacs/VSCode): VSCode
- Editor Plugin/LSP Client name and version: 0.11.0
Current behavior
Every time I trigger a recompilation (especially when the module signature changes), my MacBook Pro seems to be overloaded to the point that various apps don't respond quickly any more. Typing in VS Code is delayed, scrolling is janky.
When watching the CPU load, it can go as high as 300 (on a 6 core machine), which definitely means the machine is severely overloaded.
If I compile the entire project using mix compile
, there's no such behaviour, and the load stays below 20.
I can't really pinpoint when this all started, as I haven't used this laptop much in the last year, this July I started to use it again regularly.
I even went as far as checking for dust and lint inside the machine, and even though there was some mild amount of dust inside, the freezing issues have not stopped happening.
Do you have a project that reproduces this? Are you sure that is build alone that is hogging up on cpu and not dialyzer or workspace symbols indexing?
It's probably not the build alone, you are right. Maybe it's that multiple things happen at once, but it's always triggered when I hit save on a file that has some dependency links so there's actually >30 files that get recompiled.
I can not share the project I experience this in, since it is proprietary. It has a moderate amount of elixir code I'd say:
--------------------------------------------------------------------------------
Language files blank comment code
--------------------------------------------------------------------------------
Elixir 1023 15937 6774 75921
Would it help if I record a flame graph or something of the time in which my laptop locks up after I hit save on such a file?
Yes, a flamegraph would help. Also please post output logs. Have you tred turning off dialyzer support?
Weirdly, it works really smoothly when running on battery without any monitors plugged in. I suspect this is more of a hardware issue then.
I have this exact same issue. On a large, macro-intensive project, I get extremely long compilation times every time I switch from one branch to another. The whole time it's maxing out all CPU cores and making the entire machine unusable.
I'm on an intel macbook running OSX 12.6 versions of VSCode, ElixirLS, elixir, and erlang, are all current
Closing due to lack of repro steps