Skip to content
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

Code Helper high CPU (electron_node tsserver.js) #34401

Closed
pravesh-curefit opened this issue Oct 13, 2019 · 7 comments
Closed

Code Helper high CPU (electron_node tsserver.js) #34401

pravesh-curefit opened this issue Oct 13, 2019 · 7 comments
Assignees
Labels
Fix Available A PR has been opened for this issue

Comments

@pravesh-curefit
Copy link

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

  • VSCode Version: 1.39.1
  • OS Version: macOS 10.15

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

@mjbvz mjbvz transferred this issue from microsoft/vscode Oct 14, 2019
@mjbvz
Copy link
Contributor

mjbvz commented Oct 14, 2019

Can you please try upgrading your workspace to use typescript@next by installing this extension. Do you still this issue after installing that extension and restarting VS Code?

@pravesh-curefit
Copy link
Author

Installed the extension JavaScript and TypeScript Nightly.
Went to command palette -> Select Typescript Version -> VS Code version -> 3.7.0-dev.20191014
Restarted VSCode
Behaviour remains same

@RyanCavanaugh RyanCavanaugh assigned sheetalkamat and unassigned mjbvz Oct 30, 2019
@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Oct 30, 2019
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 3.8.0 milestone Oct 30, 2019
@janoist1
Copy link

@mjbvz This seems to have resolved the issue! Thanks!

@sheetalkamat
Copy link
Member

@pravesh-curefit can you please try out with build from #35615 (comment) to see if it helps. If not please provide complete tsserver log to be able to investigate this further

@pravesh-curefit
Copy link
Author

@sheetalkamat When I tried by adding a devDependency
"typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/57410/artifacts?artifactName=tgz&fileId=C56D34170AE2E201F9C6006F088E430E6DCD20FE710334CDAA4E0AA14B6BCD2A02&fileName=/typescript-3.8.0-insiders.20191210.tgz"
I did not get the CPU issue. Does that meant he issue is due to a typescript version?

@danhollick
Copy link

danhollick commented Dec 11, 2019

@mjbvz that extension seems to have solved my issue. Thank you.
Think I spoke too soon.

@sheetalkamat
Copy link
Member

@pravesh-curefit that means that the #35615 is fix for your issue as I suspected.

@sheetalkamat sheetalkamat added Fix Available A PR has been opened for this issue and removed Needs Investigation This issue needs a team member to investigate its status. labels Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Available A PR has been opened for this issue
Projects
None yet
Development

No branches or pull requests

6 participants