microsoft / microsoft/TypeScript
High CPU Usage in Editor (and Controls for LSP)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
I am working on low-end laptop and this "cpu spikes" are freezing my pc on large codebases :( To fix that for now I wrapped lsp cmd into cpulimit like so:
cpulimit -l 400 -- tsgo --lsp --stdioand it works, but it would be nice to have some build-in flag for this kind of stuff like we have--checkersfor the compiler. Especially since GOMAXPROCS=4 didn't work for me and I had to use third-party program (maybe that is because tsgo in my case was installed via npm and actually launched via node?)
Originally posted by @glav-git in #4347
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The affected entry point is tsgo --lsp --stdio; the issue also mentions --checkers and GOMAXPROCS as comparison points. Start by reproducing CPU spikes on a large codebase with that command, then determine the intended built-in control. Done means users can limit LSP CPU usage without wrapping tsgo in cpulimit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- performance, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100