Chapter 4. Understanding Performance

Abstract

How page speed is measured, what the numbers mean, and the handful of ideas that the rest of this book builds on. Read this once; you can come back to it whenever a term is unfamiliar.

Using PageSpeed Insights to Measure Performance

PageSpeed Insights is Google's free tool for measuring how fast a page loads. Enter a page address, click Analyze, and it shows two quite different kinds of results on the same report: field data at the top and lab data below it.

Figure 4.1. A PageSpeed Insights report
A PageSpeed Insights report with the field data assessment at the top and the lab performance score below.

Field Data: Your Real Visitors

Field data comes from real people visiting your site in Chrome, collected by Google over the last 28 days. It is labeled Discover what your real users are experiencing. It is what Google uses for search ranking, and it is the truest picture of your site's speed, because it reflects your visitors' actual phones, computers and connections.

Field data has two limitations. Small sites often don't have enough visitors for Google to show any. And because it covers 28 days, it changes slowly: an improvement you make today takes weeks to show fully.

Tip

Chapter 9, Page Experience: Real-User Monitoring collects the same kind of field data from your own visitors, for every page and every day, without waiting for Google.

Lab Data: A Test Run

Lab data comes from a single test load of your page, run by Google's servers right now, on a simulated mid-range phone with a slowish connection (or a desktop computer, on the Desktop tab). It is labeled Diagnose performance issues. Because you get the result immediately, lab data is what you use while you optimize: change a setting, test again, and compare.

The Performance Score

The lab test produces a Performance score from 0 to 100. A score of 90 or more is shown in green and counts as good; 50 to 89 is orange; below 50 is red. The score is calculated from several lab metrics, described in the section called “The Metrics That Matter”.

The mobile score is almost always lower than the desktop score, because the test simulates a slower device and connection. Concentrate on mobile: most visitors use phones, and Google ranks sites based on their mobile experience.

Why Scores Go Up and Down

Run the same test twice and the score may differ by a few points. Network conditions, the load on Google's test servers and on your own server, and third-party content such as adverts all vary from one moment to the next. To compare fairly:

  • Run each test two or three times and use the middle result.

  • Clear JCH Optimize's cache (and any server cache) after changing a setting, then load the page once yourself before testing, so the test doesn't measure the one-off work of building the optimized files.

  • Look at the individual metrics, not just the score. A change that improves LCP by a second is real progress even when the score moves only a little.

Note

The AI-assisted optimization run deals with this for you: it runs PageSpeed several times for every measurement and compares the middle values.

The Audits

Below the score, PageSpeed lists what it found. Expand any item to see which files or page elements it refers to.

Diagnostics

Things that slow the page down, often with an estimate of the time you could save. Each maps to a JCH Optimize feature; see Table 1.1, “PageSpeed suggestions and the features that address them”.

Insights

Explanations of how particular metrics were reached, for example which element was the LCP element, or which elements caused layout shifts. You will use these in the tutorial to configure some features.

Passed audits

Checks the page already passes. Watching items move into this list is a satisfying way to follow your progress.