Part III β The Speed Β· Lesson 5.4
Performance Tools
In one lineRead the waterfall before you read the code β the shape of the chart names the bottleneck.
Where you've seen itA network panel where the hero image doesn't start until three other requests have finished, one after another.
Diagram
READING A WATERFALL β the shape tells you the bug
document ββββ TTFB 620ms β slow origin
app.css βββ render-blocking
app.js ββββββββββ render-blocking
font.woff2 ββββ (discovered late)
hero.jpg ββββββββ β LCP element,
starts at 1.4s!
api/user ββββββ waited for JS
api/feed ββββββ waited for api/user
β CHAIN
βββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ€
0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0s
STAIRCASE shape = dependency chain β the real enemy
Fix: preload hero + font, parallelise the API callsWHICH TOOL ANSWERS WHICH QUESTION
"what's slow?" DevTools Network panel β waterfall
"why is the UI frozen?" DevTools Performance β flame chart,
long tasks
"what should I fix?" Lighthouse β prioritised list
"on a real device?" WebPageTest β filmstrip, real
phones, locations
"what's in my bundle?" source-map-explorer β treemap
"is it leaking memory?" DevTools Memory β heap snapshots
"what do users get?" RUM / CrUX β field p75LONG TASKS IN THE FLAME CHART
main thread βββββββββββββββββββββββββββββββββββββββββββββββΊ
[ parse ][ eval bundle.js βββ 420ms βββ][hydrate 280ms][ok]
βββββββββββββ anything > 50ms blocks input βββββ
Look for wide blocks. Width = frozen UI. Names come from your code.How it works
- Always throttle first β 4Γ CPU slowdown, Slow 4G. Unthrottled numbers on a dev machine are fiction.
- Start in the Network panel. Find the LCP resource and ask what delayed its start, not its duration.
- Identify chains. A staircase means each request had to wait for the previous one to be discovered β the highest-value fix is usually
preloador parallelisation. - Move to Performance for anything after load: long tasks, layout thrash, excessive re-render.
- Confirm with Lighthouse, then verify on a real device with WebPageTest before claiming a win.
Trade-offs
| Tool | Best for | Blind spot |
|---|---|---|
| DevTools | Deep, interactive debugging | Your machine only |
| Lighthouse | Quick prioritised audit | Simulated throttling variance |
| WebPageTest | Real devices, filmstrips | Slower to iterate |
| Bundle analyzer | What to delete | Nothing about runtime |
Chrome's Coverage tab deserves a mention: it shows unused bytes per file at runtime, which is the fastest way to justify code splitting to a skeptic.
Interview angle
"Walk me through debugging a slow page."
- Throttle, reload, open the waterfall, and find what delays the LCP element's start time.
- Chains and render-blocking resources first; only then look at bundle size and main-thread work in the flame chart.
- Verify on a real mid-tier device, then lock the win in with a CI budget (4.5) so it doesn't regress.
Recap
- Waterfall first: a staircase means a dependency chain, and that's the biggest lever.
- Flame chart for anything after first paint β wide blocks are frozen UI.
- Throttle every measurement, or you're debugging a page your users never see.