Skip to content

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.

@jasonlyu123 jasonlyu123 force-pushed the svelte-check-doc-perf branch from 81b01b2 to 704de05 Compare March 11, 2021 06:47
@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