Skip to main content

Budgets for Frontend Performances

A performance budget is a limit set on a measurable quantity, such as JavaScript kilobytes, image weight or LCP time, that a page must not exceed. Budgets are checked automatically in CI so that regressions fail a pull request instead of reaching users unnoticed.

Stage: Measure · Part of the Frontend Performance roadmap · Last reviewed 19 November 2026

What to learn in Budgets

Budgets interview questions

How do you decide a reasonable performance budget?

Start from a user goal such as LCP under 2.5 seconds on a mid-range phone over a slow connection, measure a current baseline, and compare competitors. Then derive limits for bytes and requests that make that goal achievable, and tighten gradually.

Why enforce budgets in CI rather than review them manually?

Regressions come from small changes, like one new dependency, that nobody notices in review. An automated check fails the build the moment a limit is crossed, so the cost is discussed while the change is fresh and easy to reverse.

Where Budgets fits in the Frontend Performance roadmap

Budgets belongs to the Measure stage (beginner level), which takes about 10 hours. Know your numbers.

Back to the full Frontend Performance roadmap