Learning on Web Dev Open is free for all.

Interview Prep · CodeDiagnose a slow page from its waterfall
← Code

Diagnose a slow page from its waterfall

Medium25 minFree, no account

A trace, four plausible fixes, and only one of them is on the critical path.


The question

A dashboard takes 5.8 seconds to become useful. The waterfall is below.

Say what you would fix first, what you would not bother with, and what measurement would confirm it.

Network panel, cold load, cable connection, 80ms RTT
document            0ms ──────── 420ms   (TTFB 380ms)
app.js (1.2 MB)   430ms ────────────── 1,900ms   render-blocking
fonts.css         430ms ──── 620ms
Inter.woff2       630ms ───── 900ms
GET /me         1,950ms ──── 2,150ms
GET /accounts   2,160ms ────────── 2,900ms   (waits for /me)
GET /metrics    2,910ms ──────────────── 4,400ms   (waits for /accounts)
GET /chart-lib  4,410ms ──────── 5,100ms   imported after data arrives
first useful paint                       5,800ms
25:00Commit to an answer before you open the solution. Reading it first teaches you to recognise good answers, which is not the skill being tested.

Stuck?

0 of 3 hints taken

The worked solution

written by a person · not a grade

Score yourself

0 of 5 marked
  • Identified the serial API chain as the dominant cost30
  • Ordered fixes by critical-path impact, not by alarming numbers25
  • Caught the late-loaded library and proposed preloading it20
  • Attached an expected number and a measurement to each fix15
  • Asked whether the trace is representative10

We run no AI here and nothing on this page grades you. The score is yours, and the useful number is the one you get on the same problem a month from now, cold.

kept in this browser only