Code Helper high CPU (electron_node tsserver.js) · Issue #34401 · microsoft/TypeScript (original) (raw)

Disclaimer : Went through other issues to identify duplicates. None of the other open issues have provided any solution.

Steps to Reproduce:

  1. Open project folder in VSCode with a file open in the editor.
  2. Delete node_modules from terminal.
  3. Run yarn install.
    This causes a CPU spike. The activity monitor shows the process taking most CPU as Code Helper (taking over 100% CPU).

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

Output of code --status

Version:          Code 1.39.1 (88f15d17dca836346e787762685a40bb5cce75a8, 2019-10-10T23:35:11.314Z)
OS Version:       Darwin x64 19.0.0
CPUs:             Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz (8 x 2200)
Memory (System):  16.00GB (2.54GB free)
Load (avg):       4, 3, 3
VM:               0%
Screen Reader:    no
Process Argv:     --disable-extensions .
GPU Status:       2d_canvas:                     enabled
                  flash_3d:                      enabled
                  flash_stage3d:                 enabled
                  flash_stage3d_baseline:        enabled
                  gpu_compositing:               enabled
                  multiple_raster_threads:       enabled_on
                  native_gpu_memory_buffers:     enabled
                  oop_rasterization:             disabled_off
                 
 protected_video_decode:        unavailable_off
                  rasterization:                 enabled
                  skia_deferred_display_list:    disabled_off
                  skia_renderer:                 disabled_off
                  surface_synchronization:       enabled_on
                  video_decode:                  enabled
                  viz_display_compositor:        disabled_off
                  webgl:                         enabled
                  webgl2:                        enabled

CPU %	Mem MB	   PID	Process
    0	    82	 96508	code main
    0	    66	 96533	   gpu-process
    0	   246	 96555	   window (OrderBusinessTest.ts — alfred)
    0	    66	 96563	     extensionHost
    0	    82	 96678	       electron_node tsserver.js
  101	   868	 96679	       electron_node tsserver.js
    0	    49	 96736	         electron_node typingsInstaller.js typesMap.js
    0	    82	 96564	     watcherService
    0	    33	 96651	     searchService
    0	    98	 96602	   shared-process
    0	     0	 98020	     /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=

Workspace Stats:
|  Window (OrderBusinessTest.ts — alfred)
|    Folder (alfred): 837 files
|      File types: ts(166) js(164) map(158) html(41) json(25) sh(13) woff(12)
|                  ttf(12) woff2(12) eot(12)
|      Conf files: gulp.js(1) package.json(1) tsconfig.json(1) tslint.json(1)
|                  launch.json(1) tasks.json(1)
|      Launch Configs: node(2)

Output of running Developer: Open Process Explorer in command palette
Screenshot 2019-10-14 at 1 44 02 AM

PFA the TS Server log output collected by following the steps mentioned here
out.log