What problem does it solve?
Rspack performance work often relies on cloud CI benchmarks like CodSpeed or GitHub Actions, which are noisy, slow to iterate on, and hard to reproduce locally. This Skill provides a fully local, reproducible measurement loop that judges optimization success purely by Callgrind instruction counts from a pinned Docker environment.
Core Features & Use Cases
- Reproducible local measurement: Builds a pinned Rust toolchain Docker image and runs Rspack benchmark binaries under Valgrind Callgrind, producing exact instruction counts per benchmark stage.
- Autonomous optimization rounds: Runs structured rounds of code change, correctness validation, independent review, committed snapshots, measurement, and retain-or-revert decisions until a user-specified percentage target is met.
- Progress reporting: Maintains a single persistent PR comment or task report tracking base values, per-round deltas, decisions, and correctness results.
- Use Case: A maintainer is asked to reduce the instruction count of a specific Rspack compilation stage by 5%. The Skill measures an immutable base, iterates scoped optimizations, validates correctness, and reports each round until the target is confirmed locally.
Quick Start
Use the rspack-perf-valgrind-goal skill to optimize the specified Rspack benchmark stage by the requested percentage using local Docker and Valgrind measurements.