Problem
Performance degrades gradually through many small changes, each seemingly harmless. Without agreed limits, regressions are discovered by users and fixing them later is expensive.
Set explicit limits on latency, payload size, and resource use and enforce them throughout development.
Performance degrades gradually through many small changes, each seemingly harmless. Without agreed limits, regressions are discovered by users and fixing them later is expensive.
A performance budget is a constraint, like a financial budget, that a team agrees not to exceed. It converts the vague wish for a fast product into numbers that can be tested on every change.
Teams choose a small number of metrics that correlate with user outcomes, for example largest contentful paint, total script bytes, or p95 API latency. They derive targets from user research, competitor benchmarks, and business data. Continuous integration runs synthetic tests and bundle analysis, comparing results to the budget and reporting changes on each pull request. In production, real-user monitoring validates that field data matches. When a feature exceeds the budget, the team must optimize, remove something else, or consciously raise the limit.
{
"budgets": [
{
"path": "/*",
"resourceSizes": [
{ "resourceType": "script", "budget": 170 },
{ "resourceType": "total", "budget": 500 }
],
"timings": [
{ "metric": "interactive", "budget": 3500 }
]
}
]
}
Teams adopt this approach when user experience or conversion depends on speed; multiple teams contribute to one page or request path. It is a poor fit when internal tools where speed has little business impact, or when early prototypes where measurement overhead outweighs value. The central tensions are feature richness vs speed; strict gating vs delivery velocity; synthetic precision vs real-user realism. The main benefits are that it delivers: makes performance a visible requirement; catches regressions before release; forces explicit trade-off conversations; aligns teams around shared limits. The main costs to budget for are: budgets can be arbitrary without user data; lab measurements may differ from field results; enforcement can slow delivery; requires ongoing tuning and ownership. Governance typically looks like this: product and engineering jointly own budgets; CI enforces them. Expect adoption cost to be low to medium: tooling and process agreement, and a best fit for teams of any size with performance-sensitive products. Critics point out that budgets set without field data encourage gaming of synthetic metrics, and that strict gates can push teams to bypass the checks instead of fixing causes. Treat these concerns as design inputs, and revisit the decision as traffic, team size, and failure history change.