| name | perf |
| description | The general profile-driven perf loop for any language or runtime: baseline, profile, fix the real hot path, re-measure. Use for /perf, "this is slow", or optimization work. |
Perf
The general performance loop. Profiling (CPU profile, flamegraph, memory
snapshot, trace) is the usual tool, but the loop is the same regardless of which
one fits.
Loop
- Reproduce the slow path and capture a baseline number — time, memory, FPS,
request latency, whatever matters here.
- Profile to find the real hot path: CPU profile / flamegraph / memory snapshot
/ trace as fits. Reuse the repo's existing profiler; don't build a parallel
harness.
- Read the profile, not your intuition — fix the actual hot path.
- Re-measure. Record before/after in the PR title/description.
- Ship in topical commits (
pr-update), clean, keep CI green.
Don't
- Optimize by guess before profiling.
- Fiddle with the measurement system instead of improving perf.
- Run a full suite or profile that overwhelms the machine — scope the run.
- Report gains you didn't measure.