intermediate

The API Is Fast and the Page Is Not

Read the evidence before you read the options. The signals are presented the way a dashboard would present them — nothing is labelled with the answer.

The report

Sales say the demo "feels sluggish" on customer laptops, though it is fine in the office. The backend team has checked and the API p95 is 78 ms. Someone suggested adding a cache to the API.

Server-side and real-user measurements comparedILLUSTRATIVE
SignalValueWhat it tells you
API p95 (server-side)78 msTime measured inside the API is well within target.
API p95 (measured at the browser)210 msIncluding network, the same calls take about a fifth of a second.
Largest Contentful Paint, p75 field data4.6 sThree quarters of real users wait under 4.6 s for the main content.
LCP, lab test on developer laptop1.1 sThe same measurement on a fast machine and network is four times better.
Total JavaScript transferred1.9 MB compressedThe page ships nearly two megabytes of compressed script.
JS parse + compile + execute, mid-range mobile3.2 sProcessing the script takes over three seconds on a typical device.
JS parse + compile + execute, developer laptop0.4 sThe same work takes eight times less on the development machine.
Render-blocking resources3 stylesheets, 2 scripts in `<head>`Five resources must load before the browser can paint.
What is the constraint?