microsoft / microsoft/TypeScript

electron_node tsserver.js cpu usage over 100%

Open
#44,493 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs Investigation
Dominant language
Go
Stars
111k
Forks
14.4k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

there is a problem with the react projects and vscode I work with. I've seen multiple similar issues across forums and here (including the one i posted before microsoft/vscode#98725) but none of them has a solid solution or at least explanation.
the problem is electron_node tsserver.js cpu usage getting easily over 100% while editing a few component long project.

  • VS Code Version: 1.56.2
  • OS Version: osx 11.2.3

Steps to Reproduce:

  1. after npx creat-react--app and creating a react app, add a few component to the project.
  2. try to edit one file. electron_node tsserver.js cpu usage easily gets over 100%.
  3. it happens with insider version, and also all extensions (except js/ts language features) disabled:

vscode

tsserver verbose logs while producing the above:
tsserver.log

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported CPU spike with the listed VS Code, macOS, and React project steps, then inspect the attached tsserver.log and compare it with behavior when editing a component. The issue does not name a repository file or test; done requires identifying the responsible tsserver activity and demonstrating that the excessive CPU usage no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
performance, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.