Performance Optimization
Installation
SKILL.md
Performance Optimization
Rule zero
Measure before changing. No optimization without a baseline: a number, a tool, and a reproduction. Then change one variable at a time and re-measure with the same method.
Workflow
-
Define the target in user terms: "p95 checkout < 800ms", "LCP < 2.5s on 4G mid-tier Android".
-
Find the bottleneck layer with the right tool:
Symptom First tool Page slow to render Lighthouse / WebPageTest trace, Chrome Performance panel API slow Server traces (OTel), p50 vs p99 split, slow query log Spiky latency, low CPU Queueing, GC pauses, lock contention, noisy neighbor High CPU at steady load CPU profile / flame graph Memory grows Heap snapshot diff, allocation profiling DB-bound EXPLAIN (ANALYZE, BUFFERS),pg_stat_statements