chapter six

6 Turn performance goals into budgets

 

This chapter covers

  • Translating goals into enforceable budget thresholds
  • Setting budgets for memory, bundle size, response time, and startup
  • Choosing thresholds and granularity that fit your team and product
  • Establishing governance: who owns budgets, how exceptions are handled, and how teams coordinate
  • Using constraints to drive creative solutions rather than block progress

Performance goals tell you what to aim for; performance budgets make sure you do not slip back along the way. A goal like "page loads in under 3s" gives your team direction, but it does not prevent someone from adding a feature that pushes load time to 3.5s. That requires a budget: a threshold derived from your goal, set tight enough to catch problems before users notice them.

The translation from goal to budget is not one-to-one. Goals describe what users should experience; budgets describe what code changes are allowed. If your goal is a 3s page load, your budget might cap the initial JavaScript bundle at 300KB compressed, because that is what your architecture can deliver within 3s on the devices your users actually have. The budget gives the goal a number that a CI pipeline can measure, and a pull request can check against.

6.1 Budgets keep teams honest

6.2 What to budget

6.2.1 Memory usage

6.2.2 Web: JavaScript bundle size

6.2.3 Web: Visual stability

6.2.4 Backend: API response time

6.2.5 Backend: Database query time

6.2.6 Apps: Startup time

6.2.7 Desktop: Input responsiveness

6.2.8 Choosing representative test conditions

6.3 Budget granularity

6.3.1 When global budgets suffice

6.3.2 When granular budgets help

6.3.3 Allocating headroom across teams and features

6.3.4 Budget granularity for different platforms

6.3.5 When to add granularity

6.4 Picking sensible thresholds

6.5 Budget ownership

6.5.1 Escalating budget exceptions

6.5.2 Documenting budget decisions

6.5.3 Cross-team budget coordination

6.6 Helping budgets succeed

6.7 Budgets that force better solutions

6.8 Resetting broken budgets

6.9 Summary