microsoft / microsoft/TypeScript

High CPU Usage in Editor (and Controls for LSP)

オープン
#63,876 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Needs More Info
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

> 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)_

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

影響を受けるエントリーポイントは tsgo --lsp --stdio です。この issue では、比較対象として --checkers と GOMAXPROCS についても言及されています。まず、そのコマンドを使って大規模なコードベースで CPU スパイクを再現し、次に想定されている組み込みの制御方法を特定してください。ユーザーが tsgo を cpulimit でラップせずに LSP の CPU 使用率を制限できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
go
領域
performance, tooling
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。