Skip to content
Tutorials Center
My learning

Topics

Lesson 34 of 36 ยท Projects and Practice

Project: Audit a Slow Page

A guided project: audit a deliberately slow page with the Network, Performance and Lighthouse tools, write findings, set a budget and verify each fix.

In this project you will run a complete performance audit from start to finish, the way a professional would: reproduce, measure, find causes, fix in order of value, and prove the result. You can do it on any page of your own. To keep it concrete, we use a made-up shop home page called "Acme Store" with realistic problems, and use stand-in code to practice the analysis steps that DevTools does visually.

The goal is not to memorize a checklist, but to practice the habit: every claim backed by a measurement.

The scenario

The Acme Store home page loads in about 6 seconds on a mid-range phone with a slow network. Complaints say: "the page jumps while loading" and "the buttons do nothing for a while." Your tasks:

  1. Reproduce the problem with a realistic profile.
  2. Collect measurements: Lighthouse, Network and Performance.
  3. Write findings, each with evidence.
  4. Rank fixes, apply them, and re-measure.
  5. Set a budget so the problem does not come back.

Step 1: reproduce

Use an Incognito window. In DevTools set Network: Slow 4G (or Fast 4G, depending on your audience), CPU: 4x slowdown, tick Disable cache, and use Device Toolbar (Ctrl+Shift+M) with a typical phone size. Write the setup in your notes; every later run uses the same settings, or comparisons are meaningless.

Step 2: collect evidence

Run three measurements and keep the raw data.

  • Lighthouse (Mobile, Navigation, Performance): run at least three times; record the median score and the metric values: FCP, LCP, TBT, CLS.
  • Network panel: reload and save a HAR file (right-click the list > Save all as HAR with content). Note the number of requests, total transferred size, the biggest files, the TTFB of the document and the Initiator of the LCP image.
  • Performance panel: record and reload, note long tasks, the LCP element and its breakdown, and the layout shifts.

Below is the data of the Acme Store as a small object; paste your own numbers instead when auditing a real page. The stand-in turns the raw requests into the summaries you need for a report: totals by type, the largest files and text files missing compression.

JS Stand-in: summarize a request list

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The summary immediately suggests three findings: two big uncompressed text files, 4.2 MB of PNG images, and a slow first byte.

Step 3: write findings with evidence

A good finding has four parts: observation (what you saw), evidence (the panel and number), impact (which metric or user symptom), and proposed fix. For example:

  • Observation: the hero image is a 2.4 MB PNG discovered by bundle.js.
  • Evidence: Network panel shows the request starting at 3.1 s with Initiator bundle.js:1; LCP element is this image at 5.9 s.
  • Impact: LCP 5.9 s (poor), TBT 700 ms.
  • Fix: put the image in the HTML with fetchpriority="high", convert to AVIF or WebP at the displayed size, and add width and height.

The "jumping page" complaint maps to the Layout Shifts track: product images have no dimensions and a promo banner is injected late. The "buttons do nothing" complaint maps to a 700 ms long task during load: the framework bundle (1.8 MB uncompressed) executes right after download.

Step 4: rank and fix

Estimate gain and effort for each finding and tackle the best ratio first. This stand-in produces the prioritized plan, including a cumulative estimated gain that assumes the savings overlap by 30% (a deliberate simplification so you do not promise the sum of the parts).

JS Stand-in: build a prioritized fix plan

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Apply the fixes one at a time. After each, repeat Step 2's measurements with the same throttling and record the numbers in a table: fix, LCP, TBT, CLS, transferred KB. If a fix does not move a metric, you learned something: revert it or keep it only if it is cheap and harmless.

Step 5: set a budget and guard it

Choose limits slightly looser than your final numbers, for example: JavaScript under 300 KB compressed, images under 1.5 MB per page, LCP under 2.5 s, CLS under 0.1, TBT under 200 ms. Put them in Lighthouse CI (lighthouserc.json with assertions) or a budget.json for the Lighthouse CLI so that a pull request fails when the budget is exceeded. Also set up field monitoring (the web-vitals library sending LCP, CLS and INP to your analytics) to see real users.

What to hand in

Write a one-page report: setup, baseline numbers, the findings table with evidence, the list of fixes with before and after numbers, and the budget. This is the document you would give a team. Compare your own report against the checklist in the practice lesson at the end of this chapter.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why use the same throttling settings for every measurement in the project?

    Only identical conditions let you attribute differences to your changes.
  2. 2. Which of these is a well-formed finding?

    A finding contains observation, evidence, impact and a specific fix.
  3. 3. Why might you not simply add up the estimated savings of all fixes?

    Overlapping improvements (the same bytes, the same delay) do not add linearly.
  4. 4. What keeps performance from regressing after the project?

    Budgets in CI and real-user monitoring catch regressions early.

Summary

  • Reproduce with a fixed, realistic profile and keep every run comparable.
  • Gather Lighthouse, Network (HAR) and Performance evidence.
  • Write findings (observation, evidence, impact, fix) and rank by gain per effort.
  • Fix one thing at a time, re-measure, then lock in the gains with budgets and field data.

Next: Project: Build a Trace Analyzer