Workflow Debugging

Debug a Performance Issue

Workflow for identifying and fixing performance bottlenecks

debuggingperformanceprofiling
CLAUDE.md

When debugging a performance issue:

  1. Define the problem clearly: what’s slow, how slow, and what’s the acceptable target?
  2. Profile the code. Use browser devtools, server profilers, or database query analyzers to find the bottleneck.
  3. Identify the single biggest contributor. Focus there — don’t scatter-optimize.
  4. Check common causes: N+1 queries, missing indexes, uncompressed assets, synchronous I/O, large payloads, unnecessary re-renders.
  5. Apply a targeted fix to the bottleneck.
  6. Measure again with the same profiling approach. Verify the improvement meets the target.
  7. If it doesn’t meet the target, profile again and address the next bottleneck.

Copy this workflow into your CLAUDE.md or agent config file so your agent follows this process automatically.

get crystl