Extension slow to respond
See original GitHub issueDescribe the bug
Getting auto-completion, symbol navigation or symbol information can be very slow (tooltip stuck on Loading...
).
(It is probably the language server, because the profile from “Running Extensions” does not pick it up as causing CPU load.)
To Reproduce Invoke commands like “Trigger Suggest” and “Go to Definition”.
As for the conditions necessary to cause the slowdown, i am not sure. It may have to do with using carbon-components-svelte
/carbon-icons-svelte
which introduce a lot of Svelte files.
The “Output” panel shows this for Svelte:
SnapshotManager File Statistics:
Project files: 26022
Svelte files: 7210
From node_modules: 33251
Total: 33276
Expected behavior Language features are reasonably fast.
Screenshots
System (please complete the following information):
- OS: Windows 10, 64bit
- IDE: VSCode
- Plugin/Package: Svelte for VSCode
Issue Analytics
- State:
- Created 2 years ago
- Comments:40 (17 by maintainers)
Top GitHub Comments
My apologies, I should have provided better feedback than that 🥲
I am not using the transformation. I have disabled diagnostics. I am using the latest svelte extension.
I have fixed my problem by changing my project dependencies packages versions…would have to pinpoint which one was causing the issue. Updated deps:
svelte-preprocess@4.10.1=>4.9.8
This is a rollbacksvelte@3.44.0=>3.46.3
typescript@4.4.3=>4.5.5
After making these changes, the extension is now working fine.
Ok, so I also did not see this reproduce when I tried in in VSCode proper, but I did figure out my particular issue.
Since
svelte-language-server
is linked totypescript@*
, yarn was just never upgrading it incoc-svelte
and it was still pointing to version 4.1.3. There have been a bunch of performance fixes in typescript for pnpm repositories, and indeed, after forcing it to upgrade to latest typescript it’s just as fast with pnpm as with yarn.Unfortunately this won’t really help anyone else having performance issues, but consider my problems done 😃. I am still seeing it slow with both Neovim and VSCode on really large Svelte files (like 2000 lines) with tons of reactive statements, but that’s less concerning.