question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

5 second delayed intellisense with Svelte Preprocess

See original GitHub issue

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

  1. Clone this repo: https://github.com/puruvj/macos-web
  2. Run npm install
  3. 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 of if, each, await blocks, etc. See the speed of intellisense
  4. 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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
PuruVJcommented, Jan 10, 2022

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

1reaction
naeilcommented, Aug 26, 2021

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 sec

i chage it “fast-glob” const pathResults = fastglob.sync(["**/svelte.config.{js,cjs,mjs}"], { cwd: directory, ignore: ["**/node_modules/**"], }); << is 0.1 sec

Read more comments on GitHub >

github_iconTop Results From Across the Web

Full Stack SvelteKit For Beginners - Joy of Code
SvelteKit is an opinionated full stack framework that ties the frontend and backend together delivering the best developer and user experience.
Read more >
Building oEmbeddr using Azure Static Web Apps with Svelte ...
Let's build a simple web application that uses posts embedding code generation API exposed by the social networks. TL;DR: In this chapter, ...
Read more >
bing.txt - FTP Directory Listing
... 719449 solutions 717794 princess 717794 five 717794 vista 717794 jordan ... 683912 manchester 682339 arrested 682339 second 682339 nashville 682339 ...
Read more >
Elder.js: A Svelte Framework and Static Site Generator
Elder.js is an opinionated Svelte framework and static site generator used for building blazing fast, user friendly websites.
Read more >
Svelte Radio - Transistor.fm
And Brittney is our second Master of Ceremony for Svelte Summit! ... Get your tickets for the upcoming in-person event in Stockholm before...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found