June 3, 2025Mansoury7 min read

Setting a Web Performance Budget Your Team Will Actually Stick To

Performance budgets only work when they're embedded in the CI pipeline and tied to user-centric metrics. We share the tooling setup, threshold decisions, and team rituals that have kept our client projects consistently fast over 18 months.

Performance budgets are one of the most discussed and least consistently implemented practices in web development. The concept is straightforward: define measurable thresholds for performance metrics, and fail the build when those thresholds are exceeded. In practice, most performance budgets fail not because the technical implementation is difficult, but because the organisational implementation is mishandled — the budgets are set once and never revisited, they are not tied to consequences that teams feel, or they are so strict that they become a source of constant friction rather than a meaningful guardrail.

At wecopars, we have maintained production performance budgets across multiple client projects for eighteen months. This article documents the tooling, the metric choices, the threshold-setting process, and the team rituals that have made our budgets stick.

Choosing Metrics That Map to User Experience

The first decision is which metrics to budget against. File size budgets (total JavaScript bundle, total CSS) are easy to measure but only weakly correlated with actual user experience. A 200KB JavaScript bundle that is well-split and only loads the critical path code will produce a faster experience than a 100KB monolithic bundle that blocks parsing.

We budget against user-centric metrics: Largest Contentful Paint (LCP) for loading performance, Interaction to Next Paint (INP) for responsiveness, and Cumulative Layout Shift (CLS) for visual stability. These are the Core Web Vitals that Google uses for search ranking and, more importantly, the metrics that actually track whether users are having a good experience.

The challenge with user-centric metrics is measurement variability — they depend on network conditions, device capabilities, and content at the time of measurement. We address this by measuring against a fixed throttling profile (simulated 4G network, mid-range mobile device) in CI, and by comparing against a rolling baseline rather than a fixed absolute threshold. A page that was consistently LCP 1.8s and regresses to 2.5s has a problem worth investigating, even if 2.5s is below our absolute threshold.

Embedding the Budget in CI

A performance budget that is only checked manually will be checked less and less frequently as project pressure increases. The only reliable way to enforce a budget is to make it a required check in your CI pipeline, with a clear blocking behaviour when the budget is exceeded.

Our CI setup uses Lighthouse CI with a configuration file committed to the repository. The lighthouserc.js file defines the URLs to test, the throttling profile, the assertion thresholds, and the upload destination for historical results. The CI step runs after the deployment preview is created and before the PR can be merged.

The key design decision: we distinguish between 'warn' thresholds and 'error' thresholds. An 'error' is a hard block — the PR cannot merge. A 'warn' is a flag that gets posted to the PR comment with an explanation of the regression. This two-tier approach prevents the budget from becoming an all-or-nothing gate that teams learn to work around, while still highlighting regressions that need attention.

Team Rituals That Make Budgets Sustainable

The technical implementation of a performance budget is the easy part. The hard part is creating the team culture that takes budget violations seriously without making performance work feel adversarial.

The ritual that has worked best for us is a monthly performance review, separate from the sprint retrospective. In this review, we look at the performance trend over the past month, identify the three pages or flows with the most room for improvement, and allocate time in the next sprint specifically for performance work. Performance improvements are tracked as first-class user-facing improvements, not as technical debt cleanup.

The other critical ritual is celebrating performance wins explicitly. When a developer's optimisation reduces LCP by 400 milliseconds on a high-traffic page, that gets called out in the team meeting and acknowledged in the sprint review. Performance work is often invisible to stakeholders; making it visible within the team is what sustains the motivation to keep doing it.

All articlesWritten by Mansoury