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

TS Server takes 100% cpu #98066

Closed
isidorn opened this issue May 18, 2020 · 17 comments
Closed

TS Server takes 100% cpu #98066

isidorn opened this issue May 18, 2020 · 17 comments
Assignees
Labels
semantic-tokens Semantic tokens issues typescript Typescript support issues

Comments

@isidorn
Copy link
Contributor

isidorn commented May 18, 2020

Code insiders helper renderer gets at 100% cpu for the last 3 work days for me.
My clunky reprot steps: just open vscode repository and wait until you can hear your cpu fan.

Let me know what details you would like me to provide. Please do not link me to the performance issue page :)
This was not happening 7 days ago.

@bpasero
Copy link
Member

bpasero commented May 18, 2020

@isidorn but is this using our E8 build or not? And did you make sure it is the renderer process and not some child process within (use our process explorer for that).

@bpasero bpasero added the info-needed Issue requires more information from poster label May 18, 2020
@isidorn
Copy link
Contributor Author

isidorn commented May 18, 2020

@bpasero it is not the E8 build. But the regular one.
I will use our process explorer tomorrow when this happens again.

@github-actions
Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@isidorn
Copy link
Contributor Author

isidorn commented May 26, 2020

Ok it is the TS Server
Screenshot 2020-05-26 at 10 52 09

Here is the TS Log

[Info - 07:31:19.334] Starting TS Server
[Info - 07:31:19.334] Using tsserver from: /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/node_modules/typescript/lib
[Info - 07:31:19.336] Forking...
[Info - 07:31:19.341] Starting...
[Info - 07:31:19.341] Forking...
[Info - 07:31:19.344] Starting...

@mjbvz please let me know what more data you need. I can repro this every time and hurst my productivity.

@isidorn isidorn reopened this May 26, 2020
@isidorn isidorn removed the info-needed Issue requires more information from poster label May 26, 2020
@isidorn isidorn assigned mjbvz and unassigned bpasero and deepak1556 May 26, 2020
@isidorn
Copy link
Contributor Author

isidorn commented May 26, 2020

Might it be TS semantic highlighthing that causes 100% cpu?
fyi @aeschli

@isidorn isidorn changed the title Code insiders helper - renderer 100% cpu TS Server takes 100% cpu May 26, 2020
@aeschli
Copy link
Contributor

aeschli commented May 26, 2020

@isidorn Try "editor.semanticHighlighting.enabled": false to test that hypothesis.

@isidorn
Copy link
Contributor Author

isidorn commented May 26, 2020

@aeschli I am trying it now. We will see tomorrow, since this for some reasons happens once per day.

@mjbvz mjbvz added info-needed Issue requires more information from poster typescript Typescript support issues labels May 26, 2020
@github-actions
Copy link

github-actions bot commented Jun 3, 2020

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@github-actions github-actions bot closed this as completed Jun 3, 2020
@isidorn
Copy link
Contributor Author

isidorn commented Jun 3, 2020

This was not happening with semanticHighlighting disabled.
@aeschli @mjbvz what more data would you like me to provide so we can look into this?

@isidorn isidorn reopened this Jun 3, 2020
@mjbvz mjbvz added semantic-tokens Semantic tokens issues and removed info-needed Issue requires more information from poster labels Jun 10, 2020
@aeschli
Copy link
Contributor

aeschli commented Jun 10, 2020

This will be something the TypeScript team has to look at when they take over our code. Clearly, semantic highlighting is expensive as it involve resolving many symbols. The TypeScript service does not seem to cache very much as @alexdima found in his investigations.

#92789 is the issue for the handover

@isidorn
Copy link
Contributor Author

isidorn commented Jun 10, 2020

@aeschli actually this started reproducing every couple of days even thoough I have semanticHighlighting disabled. Maybe it was happening more often when I had it turned on.
How can I provide more info that could be helpful?

@mjbvz
Copy link
Collaborator

mjbvz commented Jun 10, 2020

@isidorn Is there something that seems to trigger this? For example, running yarn?

@isidorn
Copy link
Contributor Author

isidorn commented Jun 10, 2020

@mjbvz that is a good guess.
I only see this at the start of my work day, and that is typically when I run yarn.
I will try to keep my eyes open when this happens next time, but for now I would blame running yarn

@mjbvz
Copy link
Collaborator

mjbvz commented Jun 10, 2020

Thanks. This could be #98665, which has been fixed upstream by microsoft/TypeScript#37653

I will update us to use the TypeScript 4.0 build with this fix soon. Hopefully that will address the problem

@isidorn
Copy link
Contributor Author

isidorn commented Jun 11, 2020

@mjbvz thanks! Looking forward to the fix.

@primozs
Copy link

primozs commented Aug 13, 2020

@mjbvz Hi,
So this is not yet released in TS 3.9.7 right? vscode 1.47.3
I get high cpu on yarn install. like described in #98665

code --status
CPU
108 819 86184 electron_node tsserver.js

@mjbvz
Copy link
Collaborator

mjbvz commented Oct 14, 2020

Closing this for now since the upstream TS has been fixed. Let me know if you still see the problem when using the latest VS Code builds

@mjbvz mjbvz closed this as completed Oct 14, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
semantic-tokens Semantic tokens issues typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

6 participants