Skip to content

+880 1912 875657

Performance budgets that actually hold
Engineering2 min read

Performance budgets that actually hold

Every team agrees the site should be fast. Almost none of them stop it getting slower. The difference is whether the budget is enforced by a person or by the build.

bdSpark Admin

bdSpark

Performance degrades the way a room gets untidy: never in one decision, always in forty small ones. A tracking script here, an unoptimised image there, a component that pulls in a date library for one function. Each is individually defensible and the aggregate is a page that takes six seconds on a mid-range phone.

Targets written in a document do not stop this. Only automation does.

Budget the things users feel

Pick a small number of metrics tied to perceived speed and set a number on each:

  • Largest Contentful Paint — under 2.5s on a throttled mid-range mobile profile
  • Interaction to Next Paint — under 200ms
  • Cumulative Layout Shift — under 0.1
  • JavaScript shipped to the client — a hard kilobyte ceiling per route

That last one is the most useful, because it is the one a developer can act on inside a pull request. "LCP regressed" prompts an investigation. "This PR adds 47KB to the product page" points at the line that did it.

Enforce it where the change happens

The budget belongs in continuous integration, failing the build. Not on a dashboard someone checks weekly — by then the change is merged, it is Friday, and reverting it means unpicking three other things.

Two checks cover most of it: a bundle-size assertion per route, and a Lighthouse run against a preview deployment with thresholds. Both are ordinary CI jobs. The engineering effort is an afternoon; the discipline is what is scarce.

Measure on the device your users have

A developer laptop on office fibre is not a measurement, it is a reassurance. Run the audit under CPU throttling and a simulated 4G connection. The numbers will be worse and they will be true.

Give the budget an owner and an exception path

Budgets fail in one of two ways: nobody owns them, so breaches get waved through; or they are absolute, so the first legitimate exception teaches everyone the check is theatre.

Make exceptions possible and visible. A budget override should require a comment explaining the trade-off and a named approver. Most people, faced with writing that comment, find the smaller library instead.

What this is worth

On one storefront rebuild we enforced a bundle ceiling on the product page from day one. Over five months it failed the build eleven times. Each of those eleven was a change that would have shipped, gone unnoticed, and been discovered months later as "the site feels slower than it used to" — with no obvious commit to blame.

A starting budget you can copy

RouteJavaScript shippedLCP (mobile, throttled)INPCLS
Home≤ 250 KB≤ 2.5 s≤ 200 ms≤ 0.1
Listing / index≤ 200 KB≤ 2.5 s≤ 200 ms≤ 0.1
Article / detail≤ 180 KB≤ 2.5 s≤ 200 ms≤ 0.1

Adjust the numbers to your audience and device mix — the discipline of having them, arguing over them once, and then automating them is the point. This is also the checklist we run against our own marketing site before every release; the web application development service bakes budget enforcement into continuous integration from the first sprint, because retrofitting it after launch is an order of magnitude more expensive.

  • Performance
  • Architecture
Keep reading

Related articles

Engineering4 min read

ERP Implementation Steps: A Practical Timeline

Five steps — process mapping, data cleanup, configuration, parallel run, cutover — across 12–20 weeks. The parallel run is the one everyone skips, and the one that decides how go-live goes.

Read article
Start a conversation

Have an idea? Let's build something remarkable.

Tell us about your business challenge, your product idea, or the process that's costing you more than it should. We'll give you an honest view of what we would do about it.

  • We reply to project inquiries within one business day.
  • Ready-made products to configure, or software built from scratch