intermediate 2 min answer

A web experience for low-end devices on slow networks keeps regressing despite good intentions. What mechanism prevents this, and what must it measure?

physics-wallahperformance-budgetmobileregressionci
Show the full answer Hide the answer

Why intentions fail

Performance degrades through a long series of individually reasonable additions — an analytics script, a font, a feature, a library — none of which is the one that broke it. No reviewer can hold the cumulative budget in their head across a diff, and by the time it is measurable the cause is a hundred commits.

The mechanism

An automated budget enforced in the pipeline, failing the build on regression. Not a report, not a dashboard, not a monthly review — a build failure, because a warning is a metric nobody reads by week three.

What it must measure

  • The bytes delivered, split by type, because a total is not actionable — the regression is usually one script or one font.
  • The metrics that reflect experience rather than delivery: time to first meaningful paint, time to interactive, and input responsiveness. Bytes are a proxy; the experience metrics are the requirement.
  • On a representative device and network, which for this audience means a low-end phone on a constrained connection rather than a build agent on a fast link. Measuring on the wrong device measures the wrong system, and it is the most common reason budgets pass while users suffer.
  • The third-party share, separately, since it is frequently the majority of the payload and is added by people who never see the build.

What makes it survive

  • A named owner and a documented rationale, so that when it legitimately needs to change it is changed deliberately rather than raised at 2am to unblock a release.
  • An exception process with a record, because exceptions will happen and an unrecorded exception is indistinguishable from the budget not existing.
  • Real-user monitoring alongside the synthetic budget, since the lab measurement is a proxy and the field distribution is the truth. A budget that passes while field metrics worsen is measuring the wrong thing.

The connection to the business

For an audience on constrained devices and metered data, performance is not a quality attribute, it is access. A page that is too heavy is not slow for these users — it is unusable, and they do not report it, they leave. That reframing is what gets a budget prioritised, and it is a stronger argument than any engineering one.