npx skills add ...
npx skills add sveltejs/svelte --skill performance-investigation
npx skills add sveltejs/svelte --skill performance-investigation
Investigate performance regressions and find opportunities for optimization
foo).If you pass one branch, bench:compare automatically compares it to main.
benchmarking/compare/.results/report.txtbenchmarking/compare/.results/main.jsonbenchmarking/compare/.results/<your-branch>.jsonbenchmarking/compare/.profiles/main/*.cpuprofilebenchmarking/compare/.profiles/main/*.mdbenchmarking/compare/.profiles/<your-branch>/*.cpuprofilebenchmarking/compare/.profiles/<your-branch>/*.mdThe .md files are generated summaries of the CPU profile and are usually the fastest way to inspect hotspots.
benchmarking/compare/.results/report.txt and identify largest regressions first.benchmarking/compare/.profiles/main/<benchmark>.mdbenchmarking/compare/.profiles/<branch>/<benchmark>.mdruntime.js, reactivity/batch.js, reactivity/deriveds.js, reactivity/sources.js).Run only selected reactivity benchmarks by substring:
Runtime reactivity regressions are most likely in runes runtime tests:
For quick cpuprofile hotspot deltas between two branches:
This prints top function sample-share deltas for the selected benchmark.
bench:compare checks out branches while running. Avoid uncommitted changes (or stash them) so branch switching is safe.bench:compare run rewrites benchmarking/compare/.results and benchmarking/compare/.profiles.