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

(perf) improve svelte-check performance #872

Merged
merged 3 commits into from
Mar 11, 2021

Conversation

jasonlyu123
Copy link
Member

@jasonlyu123 jasonlyu123 commented Mar 10, 2021

Because of the setTimeout in the debounceSameArg. The document update in LSAndTSDocResolver is actually done after all the diagnostic is done. Because of that, the typescript language service has to rebuild its type checker multiple times due to a new document being loaded in.

Remove the denounce make svelte-check run a lot faster on my machine. It went down from 1:30 to 15s for one of my projects.

@dummdidumm
Copy link
Member

That is a good observation! Maybe we could even generalize this in such a way that:

  • if file is new (no prev version) or editor=false fire the change immediately
  • else do the debounce

That could maybe improve startup time on opening new files in the editor.

@dummdidumm
Copy link
Member

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants