Course contentsShow
← Web Development
Lesson 1917 of 2,98235. Web Performance FundamentalsFree lesson

Reading Performance Flame Charts

Interpret flame charts to identify long tasks and bottlenecks in rendering.

Reading Performance Flame Charts

You'll learn how to interpret flame charts in DevTools to pinpoint exactly where your JavaScript is causing slowdowns and rendering bottlenecks.

What Is a Flame Chart?

A flame chart is a visual timeline that shows exactly what your browser's main thread was doing during a recorded performance session. Think of it like a medical chart of your website's heartbeat—each colored bar represents a function call or browser activity, stacked vertically to show the call hierarchy.

The x-axis represents time (left to right), while the y-axis shows the call stack depth (bottom to top). Functions at the bottom called functions above them.

Reading the Visualization

Width = Duration: Wider bars took longer to execute. These are your potential bottlenecks.

Color coding varies by tool, but typically:

  • Yellow/gold = JavaScript execution
  • Purple = Rendering and painting
  • Green = Browser painting/compositing
  • Gray = System/idle time

Long tasks appear as any bar segment exceeding 50ms—these block the main thread and hurt interactivity (your FID/INP metrics).

Identifying Bottlenecks

Look for:

  1. Wide yellow bars: Expensive JavaScript functions
  2. Tall stacks: Deep function call chains that might indicate recursion issues or inefficient algorithms
  3. Purple clusters after yellow: JavaScript forcing expensive layout recalculations (layout thrashing)
  4. Gaps and patterns: Repeated operations that could be batched or optimized

Click any bar to see the function name, file, and exact duration. This tells you precisely where to optimize.

Key Takeaway: Flame charts map time horizontally and call depth vertically—focus on the widest bars to find the most time-consuming operations blocking your main thread.