microsoft / microsoft/TypeScript
High CPU Usage in Editor (and Controls for LSP)
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 132
Beschreibung
> 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 --stdio` and it works, but it would be nice to have some build-in flag for this kind of stuff like we have `--checkers` for 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](https://github.com/microsoft/typescript-go/issues/4347#issuecomment-5185662214)_
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Der betroffene Einstiegspunkt ist tsgo --lsp --stdio; im Issue werden --checkers und GOMAXPROCS ebenfalls als Vergleichspunkte erwähnt. Beginne damit, CPU-Spitzen in einer großen Codebasis mit diesem Befehl zu reproduzieren, und ermittle dann die vorgesehene integrierte Steuerungsmöglichkeit. Die Aufgabe ist erledigt, wenn Benutzer die CPU-Nutzung von LSP begrenzen können, ohne tsgo in cpulimit einzubetten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- go
- Bereich
- performance, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100