5 second delayed intellisense with Svelte Preprocess
See original GitHub issueDescribe the bug
I have a 23 components big app, with TypeScript and SCSS. The intellisense for just about anything(Svelte related or JS related) inside .svelte
files takes around 5-6 seconds to show up. In the very beginning when there was just 1 component, it was instantaneous.
This isn’t a problem with my computer, because I get instantaneous intellisense in .js, .ts, .tsx file even with 100+ files in the project.
In this svelte app, the intellisense in .ts files is still instantaneous, so it’s an issue with the Svelte extension only.
To Reproduce Steps to reproduce the behavior:
- Clone this repo: https://github.com/puruvj/macos-web
- Run
npm install
- Go to any Svelte file with some local state and try typing out variable names in the
<script>
tag or in the template or the snippets autocompletion ofif
,each
,await
blocks, etc. See the speed of intellisense - Now, delete
node_modules
, go to the same.svelte
file as before, and now try intellisense. It will be instantaneous now.
I think this issue is happening because of svelte-preprocess
, because I have noticed this lag in every other Svelte project with TS/SCSS with svelte-preprocess, whereas projects without it are really fast.
Expected behavior I want the intellisense to be as instantaneous with svelte-preprocess as it is is without it 🙂
System (please complete the following information):
- OS: Windows
- IDE: VSCode
- Plugin/Package: Official Svelte extension for VSCode
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:20 (10 by maintainers)
Top GitHub Comments
Whoa, awesome!
I’m on one of the new M1 Pro MacBooks, and hence, it has been blazing fast as ever. I don’t see any difference on the mac after the latest release. I can’t test on the original machine cuz I don’t have it anymore 🥲
So, really sorry, I can’t provide conclusive feedback
my case
/svelte/lib/documents/configLoader.ts:77
const pathResults = this.globSync("**/svelte.config.{js,cjs,mjs}", { cwd: directory, ignore: "node_modules/**", });
<< is very slow over 7 seci chage it “fast-glob”
const pathResults = fastglob.sync(["**/svelte.config.{js,cjs,mjs}"], { cwd: directory, ignore: ["**/node_modules/**"], });
<< is 0.1 sec