Skip to content

Constant cpu usage on windows caused by electron_node typingsInstaller.js tsserver.js typesMap.js #23390

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

Closed
mjbvz opened this issue Apr 13, 2018 · 8 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Apr 13, 2018

From @zfeher on April 12, 2018 11:55

  • VSCode Version: 1.22.1
  • OS Version: Windows 10 1709 16299.371

Steps to Reproduce:

This happens when I am opening our repo. I need to wait a while max 1-2 minutes and the process will be there and it will cause 10-17% constant cpu usage. My telemetry settings are turned off completely.

Opening an empty code instance doesn't produce this behavior.

The exported status: vscode-status.txt

The command line of the process:

"C:\Program Files\Microsoft VS Code\Code.exe" "c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib/typingsInstaller.js" --globalTypingsCacheLocation C:/Users/zfeher/AppData/Local/Microsoft/TypeScript/2.8 --enableTelemetry --typesMapLocation "c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js/../typesMap.json" 

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

Copied from original issue: microsoft/vscode#47735

@mjbvz
Copy link
Contributor Author

mjbvz commented Apr 13, 2018

@zfeher In the latest vscode insiders, can you please try collecting the typings installer logs to help us investigate this issue:

  1. In VS Code: "typescript.tsserver.log": "verbose"
  2. Restart vscode and reproduce the issue
  3. In VS Code, run the TypeScript: Open TS Server log command
    1 This should open a folder with a ti-xxx.log file in it. That is the typings installer log

If you can share that log file, I or someone on the TS team can try looking through them to see what is going on

⚠️Warning: The TypeScript log may include information from your workspace, including file paths and dependency names. If you have any concerns about posting this publicly on Github, just let me know and we can arrange something else. On our side, we only use these logs to investigate issues like this

@mjbvz mjbvz removed the javascript label Apr 13, 2018
@mjbvz mjbvz removed their assignment Apr 13, 2018
@zfeher
Copy link

zfeher commented Apr 13, 2018

@mjbvz here is the ti log (+ the ts server log as well) from the current insider version (here too I disabled the telemetry everything else is the default):

ti-13372.log
tsserver.log

@mhegazy mhegazy added the Bug A bug in TypeScript label Apr 13, 2018
@mhegazy mhegazy added this to the TypeScript 2.9 milestone Apr 13, 2018
@sheetalkamat
Copy link
Member

From TI log it looks like typing installer is watching about 1200 locations of node_modules and bower_components and the watches using polling resulting in cpu usage.

@zfeher
Copy link

zfeher commented Apr 14, 2018

Hmmm that is interesting because node_modules is excluded by default as far as I know. Also I've tried to open the same repo with removing the node_modules and the issue still occured.

@mhegazy
Copy link
Contributor

mhegazy commented Apr 14, 2018

@sheetalkamat why are not we just using a folder watcher for all of these entries?

@zfeher
Copy link

zfeher commented Apr 20, 2018

Is this fix included in the current (2018-04-20T05:17:25.189Z) insider version? Because I checked this version and the issue still occurs. The log file changed a bit though.

ti-16368.log
tsserver.log

@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Apr 20, 2018
@sheetalkamat
Copy link
Member

@zfeher Your logs shows you are using typescript@2.8.3 which doesn't include this fix. You want to try typescript@next

@zfeher
Copy link

zfeher commented Apr 21, 2018

@sheetalkamat thanks for pointing this out. Tried it again and the fix seem to be working. Thank you.

@microsoft microsoft locked and limited conversation to collaborators Jul 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

4 participants