-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
[TSServer] Very slow semantic diagnostics and completion (7s) #53609
Comments
Do you run into the same issues when you've disabled plugins? Also, would you be able to provide more details on your build? Specifically:
Also - we have a pretty lengthy page on diagnosing performance issues if you want to go in depth. |
Hi, thanks for the answer! I've removed the
While it is already weird that Find the full semantic trace here: https://gist.github.com/jeengbe/52bdc7d1e8be653925d1f063875c8200 |
I'm testing this out with both VS Code and Can you confirm? To me this doesn't seem like anything particularly related to tsserver. I'll also note that on my machine, this takes 3 seconds and isn't particularly slow. Profiling shows there's some particularly expensive conditional type somewhere in your program, but, not sure where yet. |
FYI, there are numerous reports in vscode issue microsoft/vscode#178799 with similar symptoms, mostly during TS development but I personally observed this behavior (to lesser extent) with other languages so I think it's not directly related to TS language service but more about VScode extension host. |
Hi @jakebailey, apologies, I missed your comment and forgot about the thread. I can confirm that for me, the language server is quite a bit slower than @sergei-dyshel, I believe this is not with VS Code directly, since with other (significantly larger) projects, I don't experience this issue. Maybe this is related to vercel/next.js#48748 and the issue is that TypeScript possibly misses caching certain files? Without any real knowledge of what Next does under the hood, it seems to be compiling way too many (1000+) files on a single line changed. Also, fwiw, it appears to not matter whether I use WSL or Windows directly. |
I'm on |
Bug Report
🔎 Search Terms
tsserver semantic diagnostic very slow
🕗 Version & Regression Information
With VSCode:
Running TS
5.0.2
.🙁 Problem
The language server is very slow in that changing a file results in semantic information seconds after the change, which is very painful to work with:
^ takes seconds to realize that
requireLogin
is a valid function.Similarly, the following trace shows what happens in the seven seconds that pass between
updateOpen
andsemanticDiag
: https://gist.github.com/jeengbe/438eb0e7c772e7e715b03f34cfc15df9What further information should I provide?
package.json:
tsconfig.json
Full source code: https://github.com/DigitalerSchulhof/digitaler-schulhof/blob/e1ec5070e5b79dcc319216a8c1d03b09e6da3716/frontend/src/app/(schulhof)/%7Bpaths.schulhof%7D/%7Bpaths.schulhof.login%7D/page.tsx#L10
The text was updated successfully, but these errors were encountered: