Skip to content

Measurement-First Defaults

Pack: performance Parent skill: Profiling Before Optimizing Source: performance/profiling-before-optimizing/references/measurement-first-defaults.md

  1. User-visible symptom
  2. Baseline metric
  3. Representative scenario
  4. Profiler capture
  5. Dominant hotspot
  6. Smallest optimization
  7. Re-measurement
  • React render cost: React DevTools Profiler
  • browser main-thread cost: Chrome Performance panel
  • Node.js CPU hotspots: --cpu-prof
  • memory churn: heap snapshots or allocation profiling

Do not use code style heuristics as a proxy for performance truth. A clean-looking abstraction can be cheap, and ugly code can still be fast enough.