Reading a flame graph for the first time
Wide means slow, tall means nested. Once that clicked, profiling stopped being guesswork.
18 May 2026 · 4 min readPerformanceTooling
For a long time I treated profilers as something other people used. The output looked like a mountain range and I had no idea which peak to care about.
Two rules and you can read one
- Width is time. A wide bar spent a lot of the sample in that function, and that's the only axis that matters.
- Height is call depth, not cost. A tall tower of thin bars is deep code, not slow code.
- Look for a wide plateau near the top: that's where the time actually goes, not the frames below it that merely called it.
The first real one I read had a wide plateau in JSON serialisation, on a route I had assumed was database-bound. I had spent two days tuning the wrong half of the request.
Profile first. Intuition is a hypothesis, not evidence.