A performance budget turns “make it faster” into measurable release criteria. This reusable worksheet shows how to set limits for Core Web Vitals, page weight, JavaScript, CSS, images, fonts, third-party code, API latency, and database work, with examples for content sites, SaaS dashboards, and consumer web apps.
Overview
A web performance budget is a set of limits that protects the experience as an app grows. It can cover user-facing measurements, such as loading and interaction time, as well as implementation details, such as JavaScript bytes, image weight, API response time, and database query duration.
The purpose is not to make every page identical or to optimize a score in isolation. A useful budget connects technical limits to a real user journey. A marketing page, authenticated dashboard, and image-heavy marketplace may need different budgets. Define the budget per page type or user flow when their content, code, and API dependencies differ substantially.
Use three levels for each important measure:
- Target: the preferred result for normal releases.
- Warning: a level that requires investigation before the change is considered complete.
- Hard limit: a release-blocking threshold, reserved for measures that directly affect users or reliability.
Keep the budget in version control beside the application. A pull request that adds a dependency, route, image, font, or third-party script should make its performance impact visible.
How to estimate
Start with a representative journey rather than a perfect test page. For example, choose “open the dashboard, load the first account, and display the latest activity.” Record the page URL, device profile, network condition, geographic test location, authentication state, and whether the test uses a warm or cold cache. Without these assumptions, two apparently conflicting measurements may both be valid.
Use a combination of field and laboratory data. Field data reflects real users and should guide experience decisions when it is available. Laboratory testing is repeatable and useful for pull requests, local development, and release comparisons. Browser performance panels, automated audits, real-user monitoring, network waterfalls, server logs, application traces, and database query logs each reveal different parts of the budget.
Then estimate the budget in five passes:
- Set the experience target. Choose the Core Web Vitals and key interaction outcomes that matter for the journey. As a planning starting point, teams often use targets around a 2.5-second largest-content render, a 200-millisecond interaction response, and a cumulative layout shift near 0.1, then verify the definitions and current guidance before adopting them as release policy.
- Measure the current baseline. Capture several runs and record median and slower-tail results. Do not set a limit from one unusually fast run.
- Allocate the page weight. Separate HTML, JavaScript, CSS, fonts, images, video, and third-party resources. Leave headroom instead of allocating every available byte.
- Trace the server path. Split total request time into network, application processing, database queries, cache activity, and downstream services.
- Validate on the slowest important path. Test a realistic mobile device and constrained connection, not only a developer workstation.
A simple worksheet row can use this format: measure | current value | target | warning | hard limit | test method | owner | next action. This makes the budget actionable rather than descriptive.
Inputs and assumptions
Complete the following inputs before choosing numbers.
Page and device assumptions
- Primary route or user journey
- Public, authenticated, or mixed content
- Typical viewport and device class
- Connection profile and test region
- Cold-cache, warm-cache, or both
- Expected traffic pattern and peak behavior
Frontend budget inputs
Record transferred and, where possible, compressed sizes for HTML, JavaScript, CSS, images, fonts, and third-party resources. Set a separate JavaScript budget for the initial route and for later navigations. A reasonable starting worksheet might reserve about 150–250 KB compressed for initial JavaScript on a content-oriented page, with a larger allowance for a functional dashboard only when its interaction model requires it. Treat these figures as planning assumptions, not universal limits.
For images, specify a maximum width for each display slot, a preferred format, and a maximum encoded size. For example, a card thumbnail should not download a full hero image. Count fonts by family and weight, define whether each is essential, and require a fallback strategy so text is usable while fonts load.
Backend and API inputs
Define targets for the complete API request and for its components. A useful starting worksheet could set a common read endpoint at no more than 300 milliseconds at the chosen percentile, a slower report endpoint at no more than 1 second, and a database query goal below 100 milliseconds for ordinary interactive reads. Adjust these assumptions for geography, payload size, consistency requirements, and the selected backend for app development.
Track payload size, serialization time, cache hit behavior, connection setup, downstream calls, and database time separately. An API that meets its total target by using an oversized payload may still create a poor mobile experience.
Third-party and release inputs
List analytics, support widgets, payment components, experimentation tools, embeds, and other external scripts. Give each a performance owner and a removal or review date. Third-party code should have a budget of its own because your team may not control its execution time or availability.
For operational context, pair the worksheet with a monitoring approach for logs, metrics, traces, and alerts. Capacity assumptions can be reviewed in the cloud app capacity planning worksheet, especially when traffic changes are likely to affect latency.
Worked examples
Content site
For an article page, prioritize readable content, stable layout, and fast delivery on mobile. Set a modest initial JavaScript allowance, reserve most page weight for the main image only when it is central to the article, and keep advertising or analytics scripts outside the critical path where possible. The hard limits might include no unexpected layout movement, no render-blocking optional script, and a main API request that remains comfortably below the page's experience target.
SaaS dashboard
A dashboard may legitimately ship more application code, but it should not request every chart and table before the user can see the shell. Set separate budgets for the initial route and deferred modules. Load the first useful account summary from a small endpoint, then fetch secondary panels on demand or in parallel. Define API latency targets per panel and monitor slow database queries rather than hiding them behind a generic page timer. If the architecture is changing, compare serverless functions and containers with a documented decision matrix rather than optimizing only the browser bundle.
Consumer web app
A consumer flow such as search, product detail, or checkout needs budgets for both content and interaction. Measure search response time, image selection, form feedback, and navigation between steps. Limit third-party tags on the critical route and require a fallback when an external service is slow. For release safety, pair the budget with a cloud app rollback runbook so a regression has a clear recovery path.
When to recalculate
Revisit the budget before each major release and whenever the inputs change. Recalculate after adding a framework feature, dependency, font, media treatment, third-party service, API field, database join, or authentication step. Also review it after a redesign, a hosting or CDN change, a new target market, a substantial traffic increase, or a change in device mix.
Use a monthly review for active products. Compare current measurements with the baseline, identify repeated warnings, and remove limits that no longer represent the user journey. Do not quietly raise a limit to make a failing build pass; document the reason, the expected trade-off, and the date for reassessment.
Before shipping, run this checklist:
- Test the primary journey on the agreed device and network profile.
- Compare Core Web Vitals, page weight, bundle sizes, and API timings with the worksheet.
- Inspect the waterfall for new blocking resources and third-party work.
- Review slow database queries, cache behavior, and downstream calls.
- Record exceptions with an owner and expiration date.
- Update the baseline after a verified improvement, not after a temporary test result.
A performance budget works best as a recurring decision tool. Keep the assumptions visible, measure the same journeys consistently, and change the limits only when the product or its users have genuinely changed.