perf: Squad performance audit rollup at 47082a8

Abierto
#2,481 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
6/100
Tipo de issue
Refactorización
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
nodejs, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
3.4k
Forks
516
Merge medio
1 d 15 h
PR fusionados (30 d)
116

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de github/squad

Todos los issues de github/squad

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.