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
VSCode incredibly slow, 100% CPU usage, coming from electron_node tsserver.js CPU usage #40138
Comments
Yes! VS CODE is awful after the latest update. |
from 1.47 -> 1.48? My problem existed before 1.48.0 as well |
I had no issues until this morning. It now takes about 20 seconds for a simple console app to start. |
After updating to version 1.48.0, the processor load reaches 100% (https://i.imgur.com/W30f0On.png). Everything worked well in the previous version. |
If you are not @jfarris587, open a separate issue |
@jfarris587 Can you share the project the causes this? |
@mjbvz I cannot share the private project. Why would I open another issue that is an exact copy of this one |
Then please collect the TS Server log:
If you can share the log, we will take a look to see if anything stands out
|
Downgrading to previous version is also no help |
@sheetalkamat It looks like there are a few long running calls to
|
Looks like there's around 1060 files but shouldn't cause an 80-second load time. @jfarris587 that log looks like 3.9.7 though. Does that mean you're seeing the same issue regardless of the nightly extension? |
Yes, with or without the nightly extension it produces the problem |
This happened to me right after I ran
|
Installed 1.47 (https://code.visualstudio.com/updates/v1_47) and problem went away. Running |
@DanielRosenwasser @mjbvz any progress? |
I guess my issue may be related, in the process explorer I can see multiple
|
I have used the newest version for the whole day: Version: 1.49.0 And I haven't noticed the behaviour yet |
Hi there. I can share a file on which issue reproduces stable for me: https://github.com/aleksei-berezkin/fluent-streams/blob/master/src/impl/stream.test.ts Observed behavior: whenever I edit a file in VSCode, a process running I made a small research and found out that it's likely type inference triggered by VS Code “about” output:
|
CocServer for vim also use 100% CPU |
@aleksei-berezkin do you still see this with typescript@next . If yes can you please share the tsserver log and time around which you see the issue so i can see whats happening in the log and repro it with your code base. |
There are a number of community packages that seem to commonly cause sluggishness and high CPU usage from TS. For me this is mobx-state-tree. In my project I have consistently very high CPU usage from TS and slow (5-10 second) autocomplete, go-to, and error highlighting. Other common culprits seem to be rxjs, MUI, ramda, xstate, and styled-components. Are those of you having problems using any of these dependencies? |
This has been solved. My tsconfig.json had |
I have solve my case, take a look: https://stackoverflow.com/questions/71516186/vs-code-uses-100-cpu-even-if-it-is-closed/72518926#72518926 |
Couple of things:
|
Steps Attempted to Resolve issue:
Additional Info
The project is 200k lines and smaller projects do not have the issue. Its primarily related to typescript because if I disable the built-in javascript/typescript features then the tsserver doesn't spin up, so no problem.
If I open the project freshly, find an object, and change a variable to gibberish, then it will take several minutes for VSCode to complain to me with intellisense. Simply saving, and running the app in the browser with auto-reload is faster because chrome will show me compile errors
Below is the result of running
ps aux | grep [number]
:Below is the process explorer - notice the tsserver.js using more than 100%. This happens when turning on VSCode > it then slows down to normal number > then i start editing in VSCode and it jumps back up > it stays up for 2-3min AFTER I've stopped editing > then finally slows down. But sometimes it just stays at 100 even 5+ min after I've finished editing
Below is the CPU usage from the activity monitor
Does this issue occur when all extensions are disabled?: Yes/No
The text was updated successfully, but these errors were encountered: