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.js CPU/Memory Spike #58182
Comments
Not even using |
We make heavy use of Zod and autogenerate these types from upstream Swagger definitions. I strongly suspect this slowdown is related to, ultimately, simply having just too many types. Here's an example of issues we've been having at the same time as this general TS slowdown So, long story short, I'd really like some insight into the attached tsserver logs or some tips on how to interpret it ourselves. A tip or two on mitigating the slowdowns would be super useful too! |
I wasn't able to correlate where in the log this occurred Notable lines I did see:
5-6 seconds of initial For best performance, it's always best to turn off semantic highlight. IMO the gain in colorization is not worth the perf hit in large contexts. That said, something weird happened here:
There's apparently some type in that span which is very, very expensive to compute. That approximate range shows up a few times in the log. It's possibly also referenced right here:
|
🔎 Search Terms
tsserver.js electron-nodejs memory cpu
🕗 Version & Regression Information
This performance issue began some time ago. Bisecting isn't an option due to automated swagger -> Zod processing.
I am looking for smoking guns (file-wise) so the investigation can be accelerated (please see attached verbose tsserver logs)
⏯ Playground Link
No response
💻 Code
Performance related; not code
🙁 Actual behavior
Performance related; not code
🙂 Expected behavior
Performance related; not code
Additional information about the issue
Attached is a verbose tsserver trace log.
Note that the behaviour is triggered when TS intellisense is triggered - i.e. a type lookup is made / auto import attempted etc.
I see huge spike in memory and cpu. It returns after about 45 seconds
tsserver.log.zip
The text was updated successfully, but these errors were encountered: