A screen recording of the Performance panel, paused at every long task. Performance work goes wrong when it starts with a guess. Every change in this post began with a measurement on real hardware and ended with a second measurement to prove it helped.
Sample footage: Sintel, an open movie by the Blender Foundation, released under a Creative Commons licence.
Measure before you touch anything
Field data from real users tells you where the problem is; lab tools tell you why. We start with the Core Web Vitals report, pick the worst page template, and only then open the profiler.
- Start from field data, not a lab score.
- Fix the largest resource first.
- Compare percentiles, not single runs.
- Re-measure a week later.
The biggest single win was rarely clever. Right-sized images, fewer third-party scripts, and a cache header on static assets did more than any amount of micro-optimisation in our own code.
Programs must be written for people to read, and only incidentally for machines to execute.
Harold Abelson, Structure and Interpretation of Computer Programs, 1985
We tried something similar in 2023 and rolled it back. Curious whether the tooling has caught up since.
We have a follow-up on CI in the drafts, stay tuned.
+1, this matches what we saw after the migration.
Safari 16.4 and newer are fine in our testing; older versions need the fallback line.
Any thoughts on how this interacts with server-side rendering?
Solid write-up. The warning about caching bit us hard last year.
The quote in the middle is doing a lot of work here, and it earns it.
How does this hold up on older Safari versions? That is where we always get burned.