Engineering Performance Debugging

Debug Performance Problems

Measure before reasoning: find WHERE the time goes, separate latency from memory from throughput, and think at production scale.

Overview

Performance debugging dies of premature theorizing: the team optimizes the suspected hotspot while the real one idles unprofiled. This setup investigates a dashboard that got four times slower over a month: the performance strategy demands measurement before hypothesis (where does the time actually go?), separates latency from throughput from memory — different causes, different fixes — and reasons at production scale, where the checklist lives: N+1 queries, hot-path allocations, blocking calls, cache misses, expensive loops. The month-long degradation timeline is itself evidence: what grew?

Workflow

  1. Locate before explaining

    The first demand is a measurement plan: where do the 8 seconds go? Theories come after the profile.

  2. Use growth as evidence

    4× slower over a month with no deploy points at data volume — the timeline narrows the suspects.

  3. Validate with a toggle

    The gold standard applies: turn the suspected cause off (cache it, limit it) and watch the metric move.

Why This Works

  • Measurement-first ordering prevents optimizing the wrong thing well
  • The latency/throughput/memory split routes each symptom to its own cause family
  • Scale reasoning finds the problems that test environments are too small to show

Best for

  • Pages and jobs that got slower without a deploy to blame
  • Systems where "it's the database" is assumed, not measured
  • Performance work that must justify its engineering time

Not for

  • Writing performance tests after the fix — that's the Test Case Prompt Generator's performance coverage
  • Reviewing code for performance smells without a live problem — that's the Code Review Prompt Generator

Use cases

  • Diagnosing gradual slowdowns that track data growth
  • Separating database time from render time before optimizing either
  • Finding the N+1 that was invisible at last year's scale

Tip: Save time by exploring related resources and tools that integrate with this workflow.

Explore all resources