electron_node tsserver.js using >100 CPU
See original GitHub issueIssue Type: Bug
Within the last week I have been struggling with vscode/typescript using upwards of 100% CPU. This leads to 10-30 second delays for intellisense for trivial changes.
The main culprit appears to be electron_node tsserver.js
.
I’ve seen a few similar issues but none seem to get the to root of the issue, so apologies if this is a duplicate. This looks similar to https://github.com/microsoft/vscode/issues/96255 but I am experiencing this issue with all extensions disabled.
I first notice the issue using typescript@3.8.3
. Then I tried using the nightly build per suggestion here https://github.com/microsoft/TypeScript/issues/34401#issuecomment-541947997. This worked for a day but then the issues resurfaced.
Any help debugging this would be greatly appreciated.
output from code --status
after simple code change.
Version: Code 1.44.2 (ff915844119ce9485abfe8aa9076ec76b5300ddd, 2020-04-16T17:07:18.473Z)
OS Version: Darwin x64 19.4.0
CPUs: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)
Memory (System): 32.00GB (0.04GB free)
Load (avg): 3, 2, 2
VM: 0%
Screen Reader: no
Process Argv: .
GPU Status: 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
CPU % Mem MB PID Process
0 131 23817 code main
0 66 23830 gpu-process
0 33 23832 utility
0 295 23833 window (portal.tsx — elastic-charts)
0 98 23836 extensionHost
0 98 23838 electron_node tsserver.js
100 623 23839 electron_node tsserver.js
0 33 23854 electron_node typingsInstaller.js typesMap.js
0 33 23866 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer) /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/jsonServerMain --node-ipc --clientProcessId=23836
0 33 23837 watcherService
0 33 23911 searchService
0 66 23860 shared-process
0 0 24878 /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
0 66 24847 window (Issue Reporter)
Workspace Stats:
| Window (portal.tsx — elastic-charts)
| Folder (elastic-charts): 2705 files
| File types: ts(640) map(600) png(534) js(314) tsx(307) scss(31) md(17)
| json(16) mdx(12) DS_Store(4)
| Conf files: tsconfig.json(5) webpack.config.js(3) package.json(1)
| launch.json(1) settings.json(1)
| Launch Configs: node(2)
VS Code version: Code 1.44.2 (ff915844119ce9485abfe8aa9076ec76b5300ddd, 2020-04-16T17:07:18.473Z) OS version: Darwin x64 19.4.0
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i9-9980HK CPU @ 2.40GHz (16 x 2400) |
GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: disabled_off protected_video_decode: unavailable_off rasterization: enabled skia_renderer: disabled_off_ok video_decode: enabled viz_display_compositor: enabled_on viz_hit_test_surface_layer: disabled_off_ok webgl: enabled webgl2: enabled |
Load (avg) | 3, 2, 2 |
Memory (System) | 32.00GB (0.19GB free) |
Process Argv | . |
Screen Reader | no |
VM | 0% |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:25
- Comments:14 (1 by maintainers)
Top GitHub Comments
@nickofthyme Try checking ‘TypeScript: Disable Automatic Type Acquisition’ in the settings. That seems to have helped, for me at least.
Is this issue resolved or no one except me is facing this? I have the same issue, and it started all of a sudden, because during last year VSCode was running very smoothly, with no delays or errors at all, and yesterday it blocked the whole intellisense, autocomplete, imports, everything, it’s just stuck in loading state and I can see in that
electron_node tsserver
orCode Helper (Renderer)
process is taking more than 100CPU. I’ve tried with installing many different (older) versions of VSCode but nothing looks like it’s not related with that.Really don’t know what to do, I’m on M1 Mac, project is React Native, Typescript, I have only two extensions (Eslint and Prettier), but even without them I get the same issue.
Any advices/suggestions will be appreciated a lot…