completefrontend
Open lab My progress
THE WEB PERFORMANCE FIELD GUIDE

Performance in interviews

Answer speed questions in frontend interviews the way this course measures: ask, measure, fix the biggest part, and back every claim with real numbers.

By the end, you can
  • 01
    Spot the four kinds of questionTell a quick quiz question from a slow-page problem, a system design round and a question about your past work.
  • 02
    Answer measure-firstAsk what's slow and for whom, read the field, reproduce it in the lab, fix the biggest part, and check the field again.
  • 03
    Bring speed into a design roundSay speed targets early, tie each part of a page to a metric, and name what each choice costs.
  • 04
    Tell a win with numbersUse X, measured by Y, by doing Z, say what you did yourself, and expect the follow-up questions.

A practice interview at the Leaf and Kettle

Ravi has a job interview next week. It's for a frontend developer role at a bigger company. Ben offers to help. He'll play the interviewer, and read out questions from real interview guides. They sit down in the shop after closing time.

Ben reads the first question: "Our home page is slow on phones. How would you fix it?"

Ravi answers at once. "I'd compress the images and lazy-load them. I'd minify the JavaScript. And I'd put the site on a CDN."

Ben frowns. "Which one first? And how do you know any of them would help?"

It's a fair question. Ravi's tips are real techniques. To minify code is to strip out its spaces and comments. A CDN keeps copies of a site on servers close to its visitors. To lazy-load an image is to tell the browser to wait before it fetches it.

But Ravi never said what was slow, or how he'd find out. One tip would even have made the shop's home page slower. In lesson 40.1, the home photo was lazy-loaded. Loading it first saved 552 ms in the lab.

So what does a good answer sound like? Ravi tries again. This time he starts from numbers the shop really measured:

Ravi's second answer starts with numbersPop out in the code editor (opens in a new tab)JavaScript
// The home page on phones (lesson 40.1): real visits, then one lab loadconst field = { p75: 4896, line: 2500 };const parts = { ttfb: 563.4, loadDelay: 657, loadDuration: 5159.3, renderDelay: 6.6 }; const lcp = Object.values(parts).reduce((sum, ms) => sum + ms, 0);const [name, ms] = Object.entries(parts).sort((a, b) => b[1] - a[1])[0];console.log(`p75 LCP on phones: ${field.p75} ms. Good is ${field.line} ms or less.`);console.log(`Biggest part in the lab: ${name}, ${Math.round((ms / lcp) * 100)}% of ${Math.round(lcp)} ms`);
  • Line 1 is a comment. The numbers come from lesson 40.1, Ravi's audit of the shop.
  • Line 2 is field data: numbers from real visits. LCP, Largest Contentful Paint, is the moment the biggest image or text appears. p75 is the 75th percentile: three visits in four were at or under it. Google counts an LCP of 2,500 ms or less as good. A millisecond (ms) is a thousandth of a second.
  • Line 3 is one lab load, cut into LCP's four parts by DevTools. You'll meet the four parts in a moment. That load's LCP was 6,386 ms. The middle of Ravi's five lab loads, which you'll see below, was 6,388 ms.
  • Line 5 adds the parts up. Line 6 sorts them and keeps the biggest.
  • Lines 7 and 8 print p75 LCP on phones: 4896 ms. Good is 2500 ms or less. and Biggest part in the lab: loadDuration, 81% of 6386 ms.

Now Ravi has an answer. "Real phone visits wait 4.9 seconds at p75. In the lab, 81% of the wait is the photo's download. So I'd make the photo smaller first. Then I'd check the field again." Ben nods. That answer says what's slow, how Ravi knows, and what he'd do first. Here are both answers side by side:

Two answers to "Our home page is slow on phones. How would you fix it?" Ravi's first answer is four tips: Compress the images, Lazy-load the images, Minify the JavaScript, Put it on a CDN, with no numbers and no order. His second answer is five steps, one after another: Ask: which page, who, which number?; Field: p75 LCP 4,896 ms on phones; Lab: 6,388 ms, Slow 4G, CPU 4×; Cause: photo download, 81% of LCP; Fix the photo, then check the field.Ravi's first answerCompress the imagesLazy-load the imagesMinify the JavaScriptPut it on a CDNno numbers, no orderRavi's second answerAsk: which page, who, which number?Field: p75 LCP 4,896 ms on phonesLab: 6,388 ms, Slow 4G, CPU 4×Cause: photo download, 81% of LCPFix the photo, then check the field
The same question, answered twice. The four tips on the left can't be checked. The five steps on the right each come with a number the shop really measured, and they say what to fix first.

Why it matters: a list of tips sounds busy, but nobody can check it. A measured answer can be checked, step by step.

Real-life analogyShow your working in a maths test

In a maths test, the teacher wants to see your working. A right answer with no working gets few marks. Clear working with a small slip still gets most of them. And a good student checks the answer by putting it back into the question.

In real life: The working on the page
In an interview: The steps you say out loud: ask, measure, find the cause
In real life: The final answer
In an interview: The fix you choose
In real life: Marks for the working
In an interview: The interviewer judging how you think
In real life: Putting the answer back into the question
In an interview: Measuring again after the fix

Google's own interview tips say the same. "It's not just about giving the 'right' answer," they say. "The interviewer will be looking to see the thought process versus the answer itself."

The main idea

Speed questions in an interview test how you find out, not how many tips you know. Ask what's slow, and for whom. Measure it. Find the biggest part. Fix that, and check that it worked. Then tell your results as numbers you measured. A tip is a guess. A measurement is an answer.

The rest of the lesson follows Ben's practice interview, one kind of question at a time:

  • Common questions: the four kinds you'll meet.
  • Measure first: how to answer "why is it slow?"
  • System design: speed in a design round.
  • Your own wins: how to tell a result with numbers.

Where Ravi's numbers come from

  • The lab: earlier lessons of this course, recorded in real Chrome. Most use "Asha's phone": a phone's screen, DevTools' Slow 4G network and a CPU 4 times slower. Each answer links to the lesson that measured it.
  • The field: the shop's visits from lessons 40.1 and 40.3. Each one ran in real Chrome, with its own phone speed and network.
  • The advice: Google's and Amazon's own pages for the people they interview, and the Front End Interview Handbook.

Four kinds of question

Ben's questions come from interview guides. The Front End Interview Handbook is a free guide to frontend interviews, by Yangshun Tay. Amazon and Google each publish advice for the people they interview. And this site's own system design pages end with interview questions. Between them, speed comes up in four kinds of question. Read each row across: the kind, an example, and what a good answer does.

Four kinds of question about speed
The kind of questionAn exampleWhat a good answer does
A quick quiz question"What are the four parts of LCP?"It gives the fact in a sentence or two, then one number that shows it.
A "why is it slow?" problem"Our home page is slow on phones. How would you fix it?"It asks, measures, finds the biggest part, and fixes that first.
A system design round"Design a carousel widget."It says speed targets early, and ties each choice to a number.
A question about your past work"Tell me about a time you made something faster."It tells one real story: what you did, with numbers before and after.
  • Quick quiz questions. The handbook calls them "short questions which test your knowledge and have clear non-subjective answers." It says they come up inside other rounds, and even from recruiters.
  • "Why is it slow?" problems. The site's own Runtime performance page ends with questions like these. "A search box over 50,000 items lags on every keystroke," one begins. Its model answer starts: "First I'd measure."
  • System design rounds. Amazon's page for front-end engineers says to expect "at least one question on front-end systems design." Its examples include a "Carousel Widget".
  • Questions about your past work. Google says many of its questions sound like "Tell me about a time when…"
Real-life analogyA trial shift in a kitchen

A cook who applies to a restaurant often works a trial shift. The head chef asks quick questions: "How long do you rest a steak?" She hands over a sauce that has split: "What went wrong?" She asks for a menu for a busy Saturday. And over coffee: "Tell me about a dish you're proud of."

In real life: "How long do you rest a steak?"
In an interview: A quick quiz question
In real life: A sauce that has split: "What went wrong?"
In an interview: A "why is it slow?" problem
In real life: A menu for a busy Saturday
In an interview: A system design round
In real life: "Tell me about a dish you're proud of"
In an interview: A question about your past work

Short answers, with a number

The quick questions are where earlier lessons pay off most. A good answer is one or two plain sentences. Then comes a number that proves it. Here is Ravi's answer to "What's the difference between lab and field data?"

Lab data and field data, with proofPop out in the code editor (opens in a new tab)JavaScript
// One teas page, loaded four ways (lesson 3.3): when the teas appeared, in msconst loads = {  "Ravi's lab test": 2228,  "a visitor on a new phone": 564,  "a regular, back again": 808,  "Asha on her cheap phone": 7628,};const times = Object.values(loads);console.log(`One page, four loads: ${Math.min(...times)} ms to ${Math.max(...times)} ms`);
  • Line 1 is a comment. The four loads come from lesson 3.3.
  • Line 3 is Ravi's lab test: a load he ran himself, with conditions he chose.
  • Lines 4 to 6 stand in for field data: real visitors on their own phones and networks.
  • Line 8 collects the four times. Line 9 prints the fastest and the slowest.
  • It prints One page, four loads: 564 ms to 7628 ms.

So Ravi says it in two sentences. "Lab data is one load I run myself, with conditions I choose. Field data comes from real visits, and the same page took from half a second to over seven." Then he adds why it matters: the field says what visitors get, and the lab helps find out why. Lesson 3.3 has the whole story.

Ravi makes flash cards for the other quick questions. Each one has a short answer, and the number that backs it. They point back to the lessons on the critical rendering path, LCP's four parts, caching, images, code splitting and budgets. Try them:

Playground: Ravi's flash cards
The answer, and its proof
Short answer
It's the work the browser must finish before the first paint: the HTML, the CSS, and any script that blocks the page. Fewer files, round trips and bytes on it mean an earlier paint.
The number that backs it
On the Mint tea page, the first words came at 352 ms with the CSS in its own file. With the CSS inside the HTML, they came at 196 ms.
Where it was measured
Lesson 5.5, The critical rendering path
Try it yourself
What is the critical rendering path?

Each card has a short answer, then one number from the lesson that measured it. Say the answer in your own words, then give the number.

Every number on these cards was recorded in an earlier lesson of this course, in real Chrome. The link takes you back to it.

Why it matters: a number from a real load turns a fact you remember into evidence. It also gives the interviewer something to ask about next.

Measure first, then fix

Back to Ben's first question. Ravi's second answer had five steps. They follow his audit in lesson 40.1 and his test in lesson 40.3, said out loud:

  1. Ask: which page, which visitors, which number?
  2. Measure the field: what do real visits get, at p75?
  3. Reproduce it in the lab: make the same problem happen on your own computer.
  4. Find the cause: the biggest part of the wait.
  5. Fix it, and check: measure again after the change.
Real-life analogyA doctor examines before she prescribes

A good doctor doesn't hand out pills as soon as you walk in. She asks where it hurts, and since when. She takes your temperature. She sends you for an X-ray, which shows exactly what's wrong. Only then does she treat it. A week later, she checks that you're better.

In real life: "Where does it hurt, and since when?"
In an interview: Which page, which visitors, which number?
In real life: Taking your temperature
In an interview: Reading the field data at p75
In real life: The X-ray
In an interview: A lab trace, cut into parts
In real life: Treating the break
In an interview: Fixing the biggest part
In real life: The check-up a week later
In an interview: Reading the field again after the fix

Step 1: ask before you answer

Interview questions are often vague on purpose. Google's tips say many questions are "intentionally open-ended", and that "asking for clarity is okay." So start by asking. Slow for whom? On which devices? By which number?

The site's Core Web Vitals page gives a quick check for any speed number you hear. Ask three things: "which percentile, which devices, and field or lab." Ravi's four loads showed why. One page, one number each, and the numbers were far apart.

Steps 2 and 3: the field, then the lab

Field data says where the problem is. Real phone visits to the home page waited 4,896 ms at p75. The lab makes the problem happen where you can look inside it. On Asha's phone in the lab, the same page took 6,388 ms.

The two numbers don't match, and they don't need to. Lesson 40.1 put it simply: you reproduce the problem, not the number. Both are far over the 2,500 ms line. That's what matters.

Step 4: find the biggest part

LCP has four parts, from lesson 17.2:

  • Time to first byte (TTFB): until the first bytes of the HTML arrive.
  • Load delay: until the browser starts to fetch the photo.
  • Load duration: the photo's download.
  • Render delay: until the photo is painted.

web.dev's LCP guide says they add up to the whole LCP, with "no overlap or gap between them." So the biggest part is where to start. Here is where the home page's 6.4 seconds went:

The home page on Asha's phone in the lab. At 1.2 s: the words, and no photo yet. At 2.8 s: the top of the photo. At 4.8 s: most of the photo. At 6.4 s: the whole photo. Below, LCP's four parts drawn to scale: TTFB 563 ms, load delay 657 ms, load duration 5,159 ms, render delay 7 ms. The load duration is 81% of the 6,386 ms.1.2 swords, no photoThe home page at 1.2 s: the words, and no photo yet2.8 stop of the photoThe home page at 2.8 s: the top of the photo4.8 smost of the photoThe home page at 4.8 s: most of the photo6.4 sthe whole photoThe home page at 6.4 s: the whole photoTTFB 563 msload duration 5,159 ms, 81%render delay 7 msload delay 657 ms
Real frames of the home page on Asha's phone, above the moment each was taken. The bars are LCP's four parts, to scale. The photo's download, the long shaded bar, is 81% of the wait.

The words came after about a second. Then the photo crept in from the top, for five more seconds. That download was 81% of the wait. Why it matters: a faster server, or smaller CSS, could only touch the other 19%.

Step 5: fix it, and check

The fix was Meera's smaller photo, loaded first. Lesson 40.3 tested it on real visitors for a week. Here it is, measured twice:

The fix, in the lab and in the fieldPop out in the code editor (opens in a new tab)JavaScript
// Meera's smaller photo, loaded first (lesson 40.3), in msconst lab = { before: 6392, after: 1308 }; // Asha's phone in the labconst field = { before: 3960, after: 600 }; // p75 of real phone visits, test week for (const [where, { before, after }] of Object.entries({ lab, field })) {  const less = Math.round((1 - after / before) * 100);  console.log(`${where}: ${before} → ${after} ms, ${less}% less`);}
  • Line 1 is a comment. Line 2 is the lab: Asha's phone, before and after the fix.
  • Line 3 is the field: the p75 of real phone visits in the test week, with the old photo and with Meera's.
  • Line 5 goes through both. Line 6 works out how much less time is left.
  • Line 7 prints lab: 6392 → 1308 ms, 80% less and field: 3960 → 600 ms, 85% less.

The test week's "before" is 3,960 ms, not 4,896. It was a different week, with different visitors. What counts is that both groups ran in the same week, picked by chance. Why it matters: the lab shows the fix works. The field shows visitors got it.

Try the five steps on all three problems from Ravi's audit. Each step is one sentence, with the number that backs it. For the taps and the jumps, lessons 26.1, 27.1 and 30.1 explain the numbers.

Playground: build a measure-first answer
Ravi's answer, step by step
  1. Ask. Slow for whom, and by which number? Ravi: the home page, on phones. The number is LCP, the moment the photo appears.
  2. Measure the field. Real phone visits: p75 LCP 4,896 ms, over the 2,500 ms line. All 72 named the photo as the LCP element.
  3. Reproduce it in the lab. Slow 4G and a CPU 4 times slower: LCP 6,388 ms. The problem shows in the lab too.
  4. Find the cause. The photo's download: 81% of LCP. It's a 1,600 px wide PNG, shown 380 px wide, and it's lazy-loaded.
  5. Fix it, and check. A smaller photo, loaded first: 1,304 ms in the lab. In a week-long test on real phones, p75 went from 3,960 ms to 600 ms.
Try it yourself
Ben asks: "Our home page is slow on phones. How would you fix it?"

Ravi answers in five steps. Each step is one sentence, and each number comes from his audit of the shop in lesson 40.1, or from the test in lesson 40.3.

The field numbers come from the shop's own visits in real Chrome. The lab is Asha's phone: a phone's screen, DevTools' Slow 4G and a CPU 4 times slower, the middle of 5 loads.

Every answer has the same shape, but each one finds a different cause. The photo was too big. The tap ran slow code. The banner arrived late. A list of tips can't tell those apart. Measuring can.

Speed in a system design round

Ben turns the page. "Design the product page for an online tea shop."

A system design round asks you to plan a whole page or widget, out loud. The Front End Interview Handbook suggests a plan called RADIO, one letter per part:

  • R, Requirements exploration: ask what the page must do, and for whom.
  • A, Architecture: the main parts, and how they fit together.
  • D, Data model: what data each part holds.
  • I, Interface definition: the API between the parts.
  • O, Optimizations and deep dive: the areas that need special care, such as speed.

Speed belongs at both ends: in the R and in the O. The handbook says candidates "should take the initiative and bring these topics up". It adds that topics like performance are "what differentiates senior candidates from junior candidates." Amazon's page lists performance as one of the objectives of a front-end design. Its notes describe it as "Quick loading and responsiveness".

Real-life analogyPlanning a house before the walls go up

Before an architect draws a house, she asks who will live there, and what the winters are like. The heating goes into the first drawing. Adding it after the walls are up costs far more. Each room's size comes from who will use it.

In real life: Who will live there, and the winters
In an interview: Which devices and networks the visitors have
In real life: Heating in the first drawing
In an interview: Speed targets in the requirements
In real life: Each room sized for its use
In an interview: Each part of the page tied to a metric
In real life: The inspection when it's built
In an interview: Field data and size checks after launch

Start with targets

So Ravi starts with a question. "Who visits? Mostly phones?" The handbook lists that question too: "What's the primary device that users will access the system on?" Ben says yes, mostly mid-range phones.

Then Ravi says his targets out loud, as the site's Core Web Vitals page suggests: good Core Web Vitals at p75, on mid-range phones. That means three lines:

  • LCP within 2,500 ms.
  • INP, Interaction to Next Paint, within 200 ms. It's how long the page takes to answer a tap.
  • CLS, Cumulative Layout Shift, within 0.1. It adds up how much the page jumps.

Tie every part to a number

Next, he draws the page and marks the number each part decides:

A phone showing the Mint tea page: its name, the tea photo, the price and Add to cart. Four notes point at it: LCP: the photo, in the HTML, sized, asked for first; INP: Add to cart, show the new count, then yield; CLS: anything that comes late, hold its space before it comes; Bytes: the CSS and JavaScript, send only what this page needs.A phone showing the Mint tea page: its name, the tea photo, the price and Add to cartLCP: the photoin the HTML, sized, asked for firstINP: Add to cartshow the new count, then yieldCLS: anything that comes latehold its space before it comesBytes: the CSS and JavaScriptsend only what this page needs
The shop's real Mint tea page on a phone, from lesson 39.3. In the design round, Ravi points at each part and names the number it decides, with his plan for it.

Then he sketches the top of the page's HTML:

Ravi's sketch of the product pageHTML
<h1>Mint tea</h1><img src="mint-800.jpg" srcset="mint-400.jpg 400w, mint-800.jpg 800w" sizes="100vw"     width="800" height="533" fetchpriority="high" alt="A cup of mint tea"><button id="add" type="button">Add to cart</button><section id="reviews" style="min-height: 30rem"></section><script src="/js/product.4f1a2c.js" defer></script>
  • Line 1 is the tea's name.
  • Lines 2 and 3 are the photo, the LCP element. It's a real <img> in the HTML, so the browser finds it early. srcset and sizes let a phone pick a smaller file. width and height hold its space, so nothing jumps when it arrives. fetchpriority="high" asks the browser to fetch it ahead of other images.
  • Line 4 is Add to cart. Its click handler, in the page's script, shows the new count first. Then it yields, and only then does the slow work, as in lesson 27.2. It yields with scheduler.yield() where the browser has it, and setTimeout() where it doesn't.
  • Line 5 is the reviews area. Its minimum height holds the space before the reviews arrive.
  • Line 6 loads the page's script without holding up the HTML. The letters and numbers in its name change with each version. So the browser can keep each version for a long time.

Then he gives each choice its evidence. Read each row across: the part, Ravi's choice, and what the course measured.

Ravi's product page, with evidence
Part of the pageRavi's choiceWhat the course measured
The photoFiles that fit the screen, in srcset, named in the HTML.On Asha's phone, LCP went from 1,524 ms with one big file to 824 ms with srcset (lesson 18.2).
Add to cartShow the new count first, then yield, then do the slow work.On the shop's cart page, a tap on the + button went from 200 ms to 40 ms in the lab (lesson 40.1).
The reviewsHold their space, or send them with the page.A late banner made CLS 0.26. With the banner in the HTML, CLS was 0 (lesson 40.1).
The CSSPut the first screen's CSS inside the HTML.The Mint tea page's first words came at 196 ms instead of 352 ms (lesson 5.5).
The JavaScriptSplit it, so each page sends only what it needs.The tea list sent 111.1 KB instead of 226.1 KB, and answered 540 ms sooner (lesson 22.4).
Coming backLong cache times, with a new file name for each version.A second visit painted at 336 ms instead of 616 ms (lesson 15.1).

The site's Core Web Vitals page puts it well: "Each sentence ties a mechanism to a metric." That's what separates a speed answer from "we'll make it fast with lazy loading".

Name the cost of each choice

No choice is free. Splitting the JavaScript made the tea list ready sooner, but the review editor slower to open. CSS inside the HTML paints sooner, but the browser can't keep it for the next page. So say the cost out loud. Amazon's page asks you to discuss "the pros and cons of various approaches".

There isn't time for every topic, either. The handbook warns there "almost definitely won't be enough time to cover every area." So go deep on the part that matters most. On this product page, that's the photo: it's the LCP element.

End with how you'll keep it fast

Ravi ends with three ways to keep the page fast after launch:

  • Field data at p75, for each page and each kind of device, from the shop's own RUM. RUM, real user monitoring, means each real visit sends its numbers home, as in lesson 12.4.
  • A size check on every pull request. One stopped Ben's carousel before it went live, in lesson 39.2.
  • A goal the team agrees, like the shop's in lesson 41.3: 9 phone visits in 10 to the Mint tea page show their LCP within 1,000 ms.

Why it matters: a design with targets, evidence and a way to keep them is one an interviewer can trust. It's also one you could build.

Tell your own wins with numbers

Ben's last question: "Tell me about a time you made something faster."

Google's tips ask you to "look back on your past work experience" before an interview. Then they add: "Google loves data". And they suggest a simple equation for each result:

"Accomplished [X], as measured by [Y], by doing [Z]."

X is what changed. Y is how you measured it. Z is what you did. Ravi fills it in with the home photo:

Ravi's win, in Google's equationPop out in the code editor (opens in a new tab)JavaScript
// Google's equation: Accomplished [X], as measured by [Y], by doing [Z]const x = "Cut the home page's p75 LCP on phones from 3,960 ms to 600 ms";const y = "our own RUM, in a week-long A/B test";const z = "running an audit of every page, ranking the fixes, and testing Meera's smaller photo";console.log(`${x}, as measured by ${y}, by ${z}.`);
  • Line 1 is a comment with the equation.
  • Line 2 is X, what changed: the p75 from lesson 40.3's test week, before and after.
  • Line 3 is Y, how it was measured.
  • Line 4 is Z, what Ravi did himself.
  • Line 5 joins them. It prints Cut the home page's p75 LCP on phones from 3,960 ms to 600 ms, as measured by our own RUM, in a week-long A/B test, by running an audit of every page, ranking the fixes, and testing Meera's smaller photo.

Every part of that sentence can be checked. The numbers come from the shop's own test. And it says what Ravi did.

Say "I" for your part, and name the others

Ravi didn't build the photo. Meera did. So what should he say? Amazon's page is clear: "Focus on what you owned and worked on rather than what your team did. 'I' is better than 'we.'"

Ravi ran the audit. He ranked the fixes. He planned the test and read its result. So he says "I" for those, and names Meera for the photo. Amazon also asks you not to "finger-point or blame-shift".

Real-life analogyA match report with the score

After a football match, a player is asked about the game. "We played well" tells you nothing. "We won 3–1, and I scored the second goal from Sam's pass" tells you the score, the player's part, and who helped. The league table shows whether it was just one lucky game.

In real life: The score, 3–1
In an interview: The numbers before and after
In real life: "I scored the second goal"
In an interview: What you did yourself
In real life: "From Sam's pass"
In an interview: Naming who built the rest
In real life: The league table
In an interview: Field data, not one lab load

STAR: a story in four parts

Both Google and Amazon suggest the STAR method for stories like this: Situation, Task, Action and Result. Google's page calls the A "Activity". Here is Ravi's story:

  • Situation: "A customer told us our home page was slow on her phone. Our field data showed phone visits waiting 4.9 seconds at p75."
  • Task: "I had to find the problems that hurt the most visits, and fix those first."
  • Action: "I audited all five pages, and ranked the fixes by visits helped per hour of work. Meera built a smaller photo, loaded first. I tested it against the old one for a week."
  • Result: "Phone visits that showed the photo within a second went from 4% to 94%. Clicks on 'See all our teas' went from 33% to 48%."
The home page on Asha's phone at 1.3 s. The old page: the words, and no photo yet. Meera's page: the whole photo. Beside them, Ravi's sentence in three parts. X: what changed: p75 LCP 3,960 → 600 ms. Y: how it was measured: RUM, a week-long A/B test. Z: what Ravi did: audit, ranking, test.The old pageThe old page at 1.3 s: the words, and no photo yetwords, no photoMeera's pageMeera's page at 1.3 s: the whole photothe whole photoX: what changedp75 LCP 3,960 → 600 msY: how it was measuredRUM, a week-long A/B testZ: what Ravi didaudit, ranking, test
On the left, both pages at 1.3 s on Asha's phone: the old one shows only the words, and Meera's shows the whole photo. On the right, Ravi's win as X, Y and Z.

Amazon's page says to "include metrics or data and be prepared for follow-up questions." Each number invites one. A lab number invites "did real visitors see it?" A click number invites "how do you know it wasn't luck?" Choose the Y, and see what each one proves:

Playground: choose how to measure the win
Ravi's sentence

Cut the home page's p75 LCP on phones from 3,960 ms to 600 ms, as measured by our own RUM, in a week-long A/B test, by running an audit of every page, ranking the fixes, and testing Meera's smaller photo.

What this number proves
Real visitors on their own phones got the faster photo. Three in four waited 600 ms or less.
A follow-up to expect, and an answer
"Why the 75th percentile, and not the average?" Ravi can answer: three visits in four were at or under it, and it's the percentile Google uses.
Try it yourself
Measured by: real visits

Pick the number Ravi quotes. The sentence follows Google's equation: accomplished X, as measured by Y, by doing Z. Z stays the same: it's what Ravi did.

All four numbers come from the same fix: Meera's smaller photo, loaded first. The lab is lesson 40.3's middle load; the rest come from its week-long test on real phone visits.

Not every story is a win

Amazon adds that "not every story has to be a success." Ravi has one of those too. In lesson 41.3, the shop's checks caught 1 of 3 slowdowns before visitors saw them. Meera's pop-up came in through the tag manager, where no check ran. What Ravi learned: a check only guards its own door. So he helped the owner set a goal counted from real visits. It sees every change, whichever door it came through.

Why it matters: a miss, told with what you learned, shows the same careful thinking as a win.

Strong answer or weak answer?

Each card is something a candidate might say. Sort it: is it measured and specific, or a guess, a list or a boast?

Strong answer or weak answer?
  • First I'd look at the field data: p75 LCP on phones, for that page.
  • I'd lazy-load every image, add a CDN and minify the code.
  • The photo's download was 81% of LCP, so I'd make the photo smaller first.
  • We made the site much faster.
  • p75 LCP on phones went from 3,960 ms to 600 ms in a week-long A/B test.
  • Our Lighthouse score is 100, so the page is fast.
  • Processing was 230 of the tap's 273 ms, so I'd show the list first, then yield.
  • I always split the code into small pieces.
Try it yourself
0 of 8 correct

Sort each answer by whether it's measured and specific.

Choose a category for every card. You can change an answer at any time; Reset clears them all.

A strong answer names a metric, a number and how it was measured. A weak one could be said about any page, by anyone.

Common mix-ups

  • "Interviewers want a long list of speed tips." No. Google's tips say the interviewer "will be looking to see the thought process versus the answer itself." A list of tips shows no thought process.
  • "Lazy loading always makes a page faster." No. The shop's home photo was lazy-loaded. Loading it first saved 552 ms in the lab.
  • "If the lab and the field disagree, one of them is wrong." No. They measure different loads. Reproduce the problem, not the number: both were far over the line.
  • "Speed only comes up if the interviewer asks." No. The Front End Interview Handbook says candidates should bring topics like performance up themselves.
  • "Saying 'we' sounds modest, so it's better." No. Amazon's page says "'I' is better than 'we.'" Say what you did, and name who did the rest.
  • "A Lighthouse score of 100 proves a page is fast." No. The score comes from one lab load on one setup, with no taps. It can't tell you what real visitors get, or how fast the page answers a tap.

Practice exercises

Answer first, then use the hints.

Exercise 1 · Warm-upThe biggest part of another page

This page's four parts come from lesson 17.2. What does the program print?

Starter codePop out in the code editor (opens in a new tab)JavaScript
// Another page's four LCP parts, in ms, from one lab load (lesson 17.2)
const parts = { ttfb: 305.7, loadDelay: 6.1, loadDuration: 676.5, renderDelay: 1135.7 };

const lcp = Object.values(parts).reduce((sum, ms) => sum + ms, 0);
const [name, ms] = Object.entries(parts).sort((a, b) => b[1] - a[1])[0];
console.log(`Biggest part: ${name}, ${Math.round((ms / lcp) * 100)}% of ${Math.round(lcp)} ms`);

Answer, then press Check. Spacing and letter case don’t matter.

    Exercise 2 · Warm-upOnly loading the photo first

    Lesson 40.1 also tried one fix alone: loading the photo first. What does the program print?

    Starter codePop out in the code editor (opens in a new tab)JavaScript
    // Only loading the home photo first, with no other change (lesson 40.1), in ms
    const lab = { before: 6388, after: 5836 }; // Asha's phone in the lab
    
    for (const [where, { before, after }] of Object.entries({ lab })) {
      const less = Math.round((1 - after / before) * 100);
      console.log(`${where}: ${before} → ${after} ms, ${less}% less`);
    }

    Answer, then press Check. Spacing and letter case don’t matter.

      Exercise 3 · PracticeThe reviews on computers

      In Ravi's audit, what was the reviews page's p75 CLS on computers?

      Answer, then press Check. Spacing and letter case don’t matter.

        Exercise 4 · PracticeThe split editor

        In lesson 22.4, the tea list was split. How many ms after a tap did the review editor open?

        Answer, then press Check. Spacing and letter case don’t matter.

          Exercise 5 · ChallengeGoogle's own example

          Google's interview tips give one example of the X, Y and Z equation. By how much did the example increase what it measured?

          Answer, then press Check. Spacing and letter case don’t matter.

            Exercise 6 · ChallengeThe tap's slow function

            Open Ravi's tea list in Chrome. In DevTools, set the CPU to a 4× slowdown, record, and tap Herbal. In the Bottom-up tab, which function has the most self time?

            Answer, then press Check. Spacing and letter case don’t matter.

              Check your understanding

              For each question, ask: is this about asking, measuring, designing, or telling a result?

              The performance interviews quiz · 7 questionsScore: first tries count
              1. Question 1 of 7Ben asks: "Our product page is slow. What would you do?" Which first sentence starts a measured answer?

                Choose an answer to see the explanation.

              2. Question 2 of 7Someone says, "Our LCP is 1.9 s." What should you ask first?

                Choose an answer to see the explanation.

              3. Question 3 of 7What does this check of a page's LCP print?

                Read the code, then predictPop out in the code editor (opens in a new tab)JavaScript
                const line = 2500;
                const field = 2100; // p75 LCP of real phone visits
                const lab = 3400; // one lab load, Slow 4G, CPU 4x slower
                console.log(field <= line ? "good for real visitors" : "not good for real visitors");

                Choose an answer to see the explanation.

              4. Question 4 of 7In a system design round, when should speed come up?

                Choose an answer to see the explanation.

              5. Question 5 of 7Ravi ran the audit and the test. Meera built the smaller photo. How should he tell the story?

                Choose an answer to see the explanation.

              6. Question 6 of 7In the lab, the home page's LCP was 6,388 ms. Its field p75 was 4,896 ms. What does that tell you?

                Choose an answer to see the explanation.

              7. Question 7 of 7Why is "p75 LCP on phones went from 3,960 ms to 600 ms in a week-long A/B test" a strong result?

                Choose an answer to see the explanation.

              Key takeaways

              • Speed comes up in four kinds of question: quick quiz questions, "why is it slow?" problems, design rounds, and your past work.
              • Answer measure-first: ask, read the field, reproduce it in the lab, fix the biggest part, then check the field again.
              • Back every short answer with one number from a real load, and say where it came from.
              • In a design round, say speed targets early, tie each part of the page to a metric, and name what each choice costs.
              • Tell wins as X, measured by Y, by doing Z. Say "I" for your part, name the others, and expect follow-up questions.

              Remember the one-liner.
              Don't list tips: ask, measure, fix the biggest part, and prove it with numbers you recorded.

              Sources

              The facts on this page come from these interview guides and docs:

              Coming next: How Chromium loads resources, the first lesson of Stage 14. So far, the course has used what the browser reports. Stage 14 looks inside it: how Chromium decides which file to fetch first, and why.

              CompleteFrontend Clear concepts. Working examples.