
Chat Perf
Benchmark VS Code chat UI rendering and run memory-leak checks before shipping perf-sensitive chat changes.
Install
npx skills add https://github.com/microsoft/vscode --skill chat-perfWhat is this skill?
- npm run perf:chat with text-only and additional scenarios, configurable --runs and baseline VS Code 1.115.0
- Compare local dev build, production package, or arbitrary --build vs --baseline-build paths
- Memory leak script perf:chat-leak with default 10 messages and optional --messages 20 --verbose
- Documented touchpoints: chatListRenderer.ts, chatInputPart.ts, markdown rendering, SSE streaming pipeline
- CI-friendly workflow to gate PRs that modify chat components or disposable lifecycle patterns
Adoption & trust: 65 installs on skills.sh; 186k GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Agent Browservercel-labs/open-agents
Tddmattpocock/skills
Use My Browserxixu-me/skills
Test Driven Developmentobra/superpowers
Verification Before Completionobra/superpowers
Webapp Testinganthropics/skills
Journey fit
Common Questions / FAQ
Is Chat Perf safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Chat Perf
# Chat Performance Testing ## When to use - Before/after modifying chat rendering code (`chatListRenderer.ts`, `chatInputPart.ts`, markdown rendering) - When changing the streaming response pipeline or SSE processing - When modifying disposable/lifecycle patterns in chat components - To compare performance between two VS Code releases - In CI to gate PRs that touch chat UI code ## Quick start ```bash # Run perf regression test (compares local dev build vs VS Code 1.115.0): npm run perf:chat -- --scenario text-only --runs 3 # Run all scenarios with no baseline (just measure): npm run perf:chat -- --no-baseline --runs 3 # Compare two local builds (apples-to-apples): npm run perf:chat -- --build /path/to/build-A --baseline-build /path/to/build-B --runs 5 # Build a local production package and compare against a release: npm run perf:chat -- --production-build --baseline-build 1.115.0 --runs 5 # Run memory leak check (10 messages in one session): npm run perf:chat-leak # Run leak check with more messages for accuracy: npm run perf:chat-leak -- --messages 20 --verbose ``` ## Perf regression test **Script:** `scripts/chat-simulation/test-chat-perf-regression.js` **npm:** `npm run perf:chat` Launches VS Code via Playwright Electron, opens the chat panel, sends a message with a mock LLM response, and measures timing, layout, and rendering metrics. By default, downloads VS Code 1.115.0 as a baseline, benchmarks it, then benchmarks the local dev build and compares. ### Key flags | Flag | Default | Description | |---|---|---| | `--runs <n>` | `5` | Runs per scenario. More = more stable. Use 5+ for CI. | | `--scenario <id>` / `-s` | all | Scenario to test (repeatable). See `common/perf-scenarios.js`. | | `--build <path\|ver>` / `-b` | local dev | Build to test. Accepts path or version (`1.110.0`, `insiders`, commit hash). | | `--baseline <path>` | — | Compare against a previously saved baseline JSON file. | | `--baseline-build <path\|ver>` | `1.115.0` | Version or local path to benchmark as baseline. | | `--no-baseline` | — | Skip baseline comparison entirely. | | `--save-baseline` | — | Save results as the new baseline (requires `--baseline <path>`). | | `--resume <path>` | — | Resume a previous run, adding more iterations to increase confidence. | | `--threshold <frac>` | `0.2` | Regression threshold (0.2 = flag if 20% slower). | | `--production-build` | — | Build a local bundled package via `gulp vscode` for comparison against a release baseline. | | `--no-cache` | — | Ignore cached baseline data, always run fresh. | | `--force` | — | Skip build mode mismatch confirmation prompt. | | `--ci` | — | CI mode: write Markdown summary to `ci-summary.md` (implies `--no-cache`, `--heap-snapshots`, `--cleanup-diagnostics`). | | `--heap-snapshots` | — | Take heap snapshots after each run (slow; auto-enabled in `--ci` mode). | | `--cleanup-diagnostics` | — | Delete heap snapshots, CPU profiles, and traces to save disk. During runs, only the latest run's files are kept; after comparison, files for non-regressed scenarios are deleted. Auto-enabled in `--ci` mode. | | `--setting <k=v>` | — | Set a VS Code setting override for all builds (repeatable). | | `--test-setting <k=v>` | — | Set a VS Code setting override for the test build only. | | `--baseline-setting <k=v>` | — | Set a VS Code setting override for the baseline build only. | | `--verbose` | — | Print per-run details including response content. | ### Comparing two remote builds ```bash # Compare 1.110.0 against 1.115.0 (no local build needed): npm run perf:chat -- --build 1.110.0 --baseline-build 1.115.0 --runs 5 ``` ### Comparing two local builds Both `--build` and `--baseli