Boss lesson · Unit 04
The 200 ms page
Trace a slow page, fix what overspends, and guard the budget
What you practise
- One request traced across its stages: where the milliseconds go, which fix pays most, and a check that stops it regressing
Try a question from this lesson
Pick one
This page has a budget of 200 ms and takes 400. The trace of one request is below. Which stage do you look at first?
stage ms
DNS + connect 40
auth check 30
load user 20
load 50 items 250
render HTML 50
send response 10
total 400Correct answer
load 50 items: 250 of the 400 ms
Why
The page is 200 ms over, and one stage alone takes 250. Every other stage together comes to 150 ms: making all of them instant would still leave the page over budget.
The idea
Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.
Concept
A performance budget
A budget is a number agreed before the work starts: this page answers in 200 ms.
It does two jobs. It tells you when something is too slow, and, as usefully, when to stop: inside the budget, more speed is not worth more complexity.
Split the budget across the stages of a request. A trace then shows at a glance which stage is overspending.
11 more exercises in the app
- 4× type the answer
- 4× multiple choice
- 1× fill the blanks
- 1× order the lines
- 1× true or false
Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.