The Wayback Machine - https://web.archive.org/web/20241218033526/https://github.com/microsoft/TypeScript/issues/40138
Skip to content

VSCode incredibly slow, 100% CPU usage, coming from electron_node tsserver.js CPU usage #40138

Closed
@jfarris587

Description

  • VSCode Version: 1.48.0
  • OS Version: iOS Catalina 10.15.5

Steps Attempted to Resolve issue:

  1. Disable all extensions except typescript/javascript features
  2. Install JS and TS Nightly extension as recommended
  3. Downgrading to previous version of VSCode (1.32.0)
  4. Installing latest VSCode Insiders
  5. Increased max memory allowed by typescript server
  6. Check to make sure no extension takes more than 100ms to load

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.

  • The hovering types are almost always at "loading..." state.
  • Cmd Clicking into types to see what they are is also insanely slow and practically unusable
  • Autocomplete is incredibly slow, and often nonexistent, even for basic commands like 'clo' for console.logs
  • Red error lines from intellisense are 2-5min lagging behind my actual changes. its like vscode is hung up

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]:

jfarris          90151 100.8  1.6  7160436 550880   ??  R     9:30AM   9:16.20 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer) --max-old-space-size=8072 /Users/jfarris/Documents/amaro-ui/node_modules/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --disableAutomaticTypingAcquisition --enableTelemetry --cancellationPipeName /var/folders/mg/97w2bx6d1fqdkyd9bmyh6sd00000gp/T/vscode-typescript502/31ba41063dba52b8428d/tscancellation-0b463b00b389646856b1.tmp* --globalPlugins typescript-vscode-sh-plugin --pluginProbeLocations /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation

jfarris          92342   0.0  0.0  4408572    816 s002  S+    9:40AM   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox 90151

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

Screen Shot 2020-08-14 at 9 39 47 AM

Below is the CPU usage from the activity monitor

Screen Shot 2020-08-14 at 9 39 23 AM

Does this issue occur when all extensions are disabled?: Yes/No

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: PerformanceReports of unusually slow behaviorNeeds InvestigationThis issue needs a team member to investigate its status.Needs More InfoThe issue still hasn't been fully clarifiedRescheduledThis issue was previously scheduled to an earlier milestone

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions