Reading a flame graph for the first time

Width is time. Height is the call stack. Colour usually means nothing.

A terminal screen full of process statistics

Flame graphs look intimidating. Three facts make them readable.

Width is time

The wider a box, the more samples landed in that function or the functions it called. Look for the widest boxes first.

Height is the call stack

Each box sits on top of the function that called it. The top edge is where the work actually happens.

Colour usually means nothing

In most tools the colours are random, chosen so neighbouring boxes look different. Do not read meaning into them.

What to do next

Find a wide plateau near the top. That is code spending a lot of time doing one thing. Start there, change one thing, and profile again.

Spotted a mistake?

Tell me and I will fix the post

Corrections are credited at the bottom of the article.