🤖 perf: throttle sub-agent projection refetches after usage-changed events
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- backend, performance
調査の方向性
Start from the store code that refetches the open sub-agent projection on each usage-changed event, and from the getSubagentUsage call it makes. The issue names no files, so find them by searching for those identifiers. Add a per-ancestor trailing-edge throttle of about 1 s, or a backend view cache, then rerun the 200-writes-at-20/s benchmark with the parent shown and report fetch counts and CPU before and after. The second note, about the settling stream's ledger refetch double counting, needs a design decision first.
索引モデルが issue の本文から書いたものです。
説明
After #7867, the store refetches the open sub-agent projection once per usage write for each ancestor shown on screen (single flight, no delay). An independent verifier measured the cost for a large tree:
- One
getSubagentUsagefor 107 open sub-agents costs about 29 ms of server CPU (11 ms on the main thread). - 200 headless writes at 20/s with the parent shown cost 200 fetches and 9.16 s of server CPU over 11.6 s, against 2.10 s with the parent not shown.
- The estimate is 11-22% of the backend main thread per window showing a large root at 10-20 usage events/s, about 30-60× more fetches than before #7867.
Fix: a per-ancestor minimum interval between projection fetches (about 1 s, trailing edge, so the last change always lands), or a per-sub-agent view cache on the backend. Acceptance: rerun the 200-writes-at-20/s benchmark with the parent shown, report fetches and CPU before and after, and keep totals exact.
A second note from the same verifier: a workspace's own headless spend (bash AI proxy, status titles) now shows only when that workspace's own stream ends. The store skips its own ledger refetch during its own stream to avoid counting the stream twice. The final total is correct. Fixing this needs a refetch that cannot double count the settling stream.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
- 主要言語
- TypeScript
- スター
- 2.1k
- フォーク
- 139
- 平均マージ
- 4時間 38分
- マージ済み PR(30日)
- 926
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/xum のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
🤖 fix: xum api exits 0 when a procedure returns success: false対応中かも @twotnguyen が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
awslabs/visual-asset-management-system#1278 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
mifi/lossless-cut#3213 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
plasma-umass/scalene#1123 ·
メンテナーはふだん 1 日以内に返信