performance-investigation
Investigate performance regressions and find opportunities for optimization
How do I install this agent skill?
npx skills add https://github.com/sveltejs/svelte --skill performance-investigationIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides instructions for performance benchmarking and optimization. It utilizes standard local development commands and processes locally generated reports. No security risks were identified.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Quick start
- Start from a branch you want to measure (for example
foo). - Run:
pnpm bench:compare main foo
If you pass one branch, bench:compare automatically compares it to main.
Where outputs go
- Summary report:
benchmarking/compare/.results/report.txt - Raw benchmark numbers:
benchmarking/compare/.results/main.jsonbenchmarking/compare/.results/<your-branch>.json
- CPU profiles (per benchmark, per branch):
benchmarking/compare/.profiles/main/*.cpuprofilebenchmarking/compare/.profiles/main/*.mdbenchmarking/compare/.profiles/<your-branch>/*.cpuprofilebenchmarking/compare/.profiles/<your-branch>/*.md
The .md files are generated summaries of the CPU profile and are usually the fastest way to inspect hotspots.
Suggested investigation flow
- Open
benchmarking/compare/.results/report.txtand identify largest regressions first. - For each high-delta benchmark, compare:
benchmarking/compare/.profiles/main/<benchmark>.mdbenchmarking/compare/.profiles/<branch>/<benchmark>.md
- Look for changes in self/inclusive hotspot share in runtime internals (
runtime.js,reactivity/batch.js,reactivity/deriveds.js,reactivity/sources.js). - Make one optimization change at a time, then re-run targeted benches before re-running full compare.
Fast benchmark loops
Run only selected reactivity benchmarks by substring:
pnpm bench kairo_mux kairo_deep kairo_broad kairo_triangle
pnpm bench repeated_deps sbench_create_signals mol_owned
Tests to run after perf changes
Runtime reactivity regressions are most likely in runes runtime tests:
pnpm test runtime-runes
Helpful script
For quick cpuprofile hotspot deltas between two branches:
node benchmarking/compare/profile-diff.mjs kairo_mux_owned main foo
This prints top function sample-share deltas for the selected benchmark.
Practical gotchas
bench:comparechecks out branches while running. Avoid uncommitted changes (or stash them) so branch switching is safe.- Each
bench:comparerun rewritesbenchmarking/compare/.resultsandbenchmarking/compare/.profiles.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/sveltejs/svelte/performance-investigation">View performance-investigation on skillZs</a>