vscode: Runaway tsserver.js process using >300% of CPU
Issue Type: Performance Issue
399 2130 60823 electron_node tsserver.js
Opening VSCode in any project on my machine results in a runaway process that consumes a huge amount of CPU. This is without running anything on my machine, only opening @shopify/polaris-react library. It breaks TypeScript functionality (type peaking, etc.), intellisense, etc., and makes my computer’s fan sound like it is about to achieve low earth orbit.
I’ve seen a number of other issues related to this process, so it’s clearly not just a problem for me.
Things I’ve done to attempt to fix:
- disable all extensions
- nuke node_modules and reinstall
- kill runaway processes
- using VSCode’s TS version (3.4.5) instead of ours (3.2.4)
None of it resolves. The next time I open VSCode it’s right back up over 300% CPU usage. Please fix this
VS Code version: Code 1.34.0 (a622c65b2c713c890fcf4fbf07cf34049d5fe758, 2019-05-15T21:59:22.738Z) OS version: Darwin x64 18.5.0
System Info
| Item | Value |
|---|---|
| CPUs | Intel® Core™ i7-8750H CPU @ 2.20GHz (12 x 2200) |
| GPU Status | 2d_canvas: enabled checker_imaging: disabled_off flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: enabled rasterization: enabled surface_synchronization: enabled_on video_decode: enabled webgl: enabled webgl2: enabled |
| Load (avg) | 4, 3, 3 |
| Memory (System) | 16.00GB (0.25GB free) |
| Process Argv | . |
| Screen Reader | no |
| VM | 0% |
Process Info
CPU % Mem MB PID Process
16 115 58696 code main
0 98 58807 gpu-process
0 311 58839 window (InterimTheme.tsx — polaris-react)
0 0 58843 /usr/local/bin/bash -l
0 311 58853 extensionHost
0 98 59227 electron_node server.js
0 147 59228 electron_node eslintServer.js
0 49 60506 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/jsonServerMain --node-ipc --clientProcessId=58853
385 2130 60637 electron_node tsserver.js
0 82 60640 electron_node typingsInstaller.js typesMap.js
0 49 58975 watcherService
0 49 59230 searchService
0 82 59223 shared-process
0 82 60524 window (Process Explorer)
0 82 60792 window (Issue Reporter)
0 0 60800 /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
Workspace Info
| Window (InterimTheme.tsx — polaris-react)
| Folder (polaris-react): 16662 files
| File types: map(4179) js(3906) gz(1579) scss(927) ts(759) html(410)
| tsx(326) md(174) json(89) svg(42)
| Conf files: package.json(4) tsconfig.json(3) webpack.config.js(2)
| launch.json(1) settings.json(1);
Extensions (17)
| Extension | Author (truncated) | Version |
|---|---|---|
| spellright | ban | 3.0.38 |
| markdown-preview-github-styles | bie | 0.1.6 |
| npm-intellisense | chr | 1.3.0 |
| path-intellisense | chr | 1.4.2 |
| gitignore | cod | 0.6.0 |
| vscode-eslint | dba | 1.9.0 |
| gitlens | eam | 9.8.1 |
| EditorConfig | Edi | 0.13.0 |
| prettier-vscode | esb | 1.9.0 |
| vscode-scss | mrm | 0.6.2 |
| vsliveshare | ms- | 1.0.311 |
| vsliveshare-audio | ms- | 0.1.50 |
| vsliveshare-pack | ms- | 0.3.2 |
| vscode-jest | Ort | 2.9.2 |
| vscode-graphql | Pri | 0.1.8 |
| stylelint | shi | 0.49.0 |
| spellchecker | swy | 1.2.13 |
(1 theme extensions excluded)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (4 by maintainers)
I left a comment of one of the many other issues regarding this:
I wasn’t running tsserver with verbose when it happened last so I don’t have a usable log. But when it happens the
electron_node tsserver.jsspikes up to 100-300% of CPUI might try again, but the editor gets completely unusable for me so I’m downgrading to 1.32.3 in the interrim