perf: Squad performance audit rollup at 47082a8

未關閉
#2,481 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
6/100
Issue 類型
重構
描述清晰度
需要釐清
活躍度
活躍
技術堆疊
nodejs, typescript

研究方向

This is a tracking rollup, not a task, and it names no source files or tests. Start from one of the linked focused issues (#2476 readEvents benchmark or #2482 startup baseline) and read its own scope and result contracts. Done here means every linked item has an evidence-backed disposition, per the close condition.

由索引模型根據 Issue 內容生成。

描述

Summary and status

Track the measurement-first Squad performance effort at 47082a81799710c3e457b594123d190c00596ebf, observed 2026-11-12. This tracking-only rollup links seven focused investigations derived from the initial cross-package audit.

Status: baseline triage and issue creation only. No optimization implementation, shipped gain, or end-to-end speedup is claimed.

Proposed primary owner: architect; each focused issue names one accountable specialist.

The approach follows dotnet/aspnetcore#70219, Shayne Boyer's whole-product audit microsoft/waza#846, the real packaged-command correction in microsoft/aspire#16704, and total-session measurement criteria in microsoft/aspire#20873.

Focused findings and tracking checklist

  • github/squad#2476 — One built production readEvents scaling benchmark: six size/cursor cases, raw samples, assertions and calibrated regression-sensitivity tests. No framework/CI expansion. Owner: unit-contract-tester.
  • github/squad#2482 — Measurement-only built help/version startup baseline; three rounds of 20 fresh processes per command, elapsed/RSS data and runner failure tests. No startup optimization claimed. Owner: cli-dev.
  • github/squad#2477 — Governed local-memory search. At 5,000 active 1-KiB entries, source diagnostics measure p50 approximately 377-392 ms and 5,003 reads/query; preserve governance, matching and cross-process freshness. Owner: state-storage-dev.
  • github/squad#2475 — Latest-session discovery. At 1,000 retained archives, 1,001 synchronous reads and 75.2 MB read; independent daily-archive repeat p50 121.6 ms. Preserve eligibility, ordering and recovery. Owner: state-storage-dev.
  • github/squad#2479 — Unchanged empty-tail polling only. With 10,000 events, even an empty-tail poll parses a 5.8-MB snapshot and costs p50 approximately 9.2 ms. Preserve cursors, replay, fencing and lifecycle correctness. Owner: sdk-runtime-dev.
  • github/squad#2480 — Shell-history autosave. At 10,000 messages, each synchronous save rewrites 3.75 MB and takes p50 approximately 8.4 ms in the independent repeat. Preserve all history and crash/recovery behavior. Owner: state-storage-dev.
  • github/squad#2478 — Hosted CI test critical path. Three successful runs spent 301/328/394 seconds executing tests versus 8/9/13 seconds building. Profiling-only: same-SHA hosted profiles, attribution/top-ten table, unchanged inventory and at most one separately scoped follow-up. No sharding or optimization is part of this issue. Owner: release-engineer.

Measurement provenance and limitations

Runtime diagnostics used Apple M4 arm64, 16 GiB, Darwin 25.6, Node 24.15.0 / npm 11.12.1. Each timing case used three baseline rounds of ten sequential observations, two warmups, warm OS filesystem caches, and setup/imports outside timing. Cases were rotated/reversed between rounds. An independent coordinator pass reproduced 450 timing observations across memory, backend and session scenarios and verified output/count assertions, exact SHA and cleanup.

These are source-function diagnostics, not packaged startup results: missing TypeScript/Vitest and a configured-feed E404 for locked hono-4.13.17.tgz blocked dependency restoration, build and test execution. Missing dist also blocked built benchmark/cold-start runners. Node's built-in TypeScript transformation and an isolated relative-import hook were used for diagnostics; session-store imports were bound directly to its two actual production SDK exports rather than loading the full SDK barrel. This fallback does not satisfy release/optimization acceptance.

Timing, separate untimed I/O instrumentation, retained JS heap, allocation totals and total-session RSS are different measures. No paid/live inference was run. No allocation-total, token-efficiency, application/model-throughput or whole-agent-session memory improvement is established. Hosted CI observations are separate success-only runs on different commits/runners, not controlled A/B comparisons or reliability estimates.

Audit harness, raw samples, logs and a backend CPU profile are retained in the originating Copilot session. Portable checked-in reproduction fixtures and shared raw artifacts remain a requirement of the focused work; private local artifact paths are not a public reproduction dependency.

Scope boundaries

This issue is tracking-only, not an implementation epic to execute wholesale. Each linked issue has one bounded operation or diagnostic deliverable, explicit fixture sizes, result/test requirements and exclusions. Benchmark breadth was split into backend readEvents (#2476) and packaged help/version startup (#2482); other runtime fixtures stay with their owning optimization issues. CI #2478 ends at attribution, not an open-ended optimization sweep. Proposed percentage targets are experiment acceptance budgets, not established product SLOs or already-measured gains. If a target is unsafe or unsupported, record rejection/defer rather than expanding scope.

Method and compatibility gates

  • Check existing open issues, PRs and merged equivalents before advancing any new candidate. Each win should be a focused change, not a broad speculative refactor.
  • First restore/build the exact baseline and reproduce the affected real production path. Measure shipping/packaged commands separately from dev/source-import probes.
  • Before accepting each optimization, run at least three interleaved baseline/change rounds with equivalent workloads, raw observations and CPU plus correctly labeled allocation/retained-memory evidence. Require a material improvement beyond observed variation; record rejected/noise-level candidates.
  • Preserve public APIs, behavior, governance, history, isolation, freshness, explicit errors and recovery. No unsafe shortcuts, weakened tests, dropped messages or stale-cache success paths.
  • For any cache/pool/index, document bounded ownership/lifetime, invalidation and recovery across mutations, restarts and other processes. Account for required child processes before claiming total-session memory savings.
  • Run focused correctness/lifecycle/recovery tests and required checks on the actual candidate head. Separate evidenced baseline/flaky failures from introduced regressions.
  • Record exact SHA, environment, build mode, fixture sizes, cache/warmup policy, sample count and known coverage gaps with every result.
  • Keep implementation and merge decisions separate: no change is accepted from microbenchmarks alone, and no PR is merged without the repository's maintainer/review gates.

Deduplicated and deferred candidates

  • Resolver memoization, parallel charter discovery and asynchronous scheduler execution already landed in github/squad#1112, github/squad#1113 and github/squad#1114; do not recreate those issues.
  • Benchmark foundation github/squad#1111 is existing infrastructure, not missing work. The new benchmark issue is limited to readEvents evidence; startup measurement is separate. Model-quality paired A/B github/squad#2449 remains separate.
  • Generic context/tiered-memory proposals overlap github/squad#884, github/squad#1476 and github/squad#2392. The focused local-memory search issue should link to the ADR, not compete with it.
  • Resolver-cache stress retained approximately 11.8 MiB JS heap after 30,000 synthetic distinct paths and TTL expiry. Deferred, no focused issue created: real caller cardinality/materiality has not been established.
  • Eager CLI import optimization and SQLite amplification remain unmeasured hypotheses; no proven-bottleneck issue is proposed for them.

Close condition

Close only when every linked focused item has an explicit, evidence-backed disposition: accepted diagnostic/baseline deliverable with its specified result contracts and tests, accepted material improvement with real-path before/after evidence and correctness checks, or documented rejection/defer/duplicate with rationale. A green check, closed issue, moved allocation or lower synthetic benchmark alone is not completion.

主要語言
TypeScript
星號
3.4k
分支
516
平均合併
1 天 15 小時
30 天內合併 PR
116

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

github/squad 的其他 Issue

查看 github/squad 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。