Course contentsShow
← Web Development
Lesson 1931 of 2,98235. Web Performance FundamentalsFree lesson

Types of Performance Budgets

Exploring quantity-based (file size), timing-based (load metrics), and rule-based (best practices) budget types.

Types of Performance Budgets

What you'll learn: The three main categories of performance budgets and when to use each one.

Understanding Budget Types

Once you've decided to implement a performance budget, you need to choose what to measure. Different budget types track different aspects of performance, and the best teams often use a combination.

Quantity-Based Budgets

Quantity-based budgets limit the size of resources. These are the most concrete and easiest to measure:

  • Total page weight (e.g., "max 2MB per page")
  • JavaScript bundle size (e.g., "max 350KB of JS")
  • Image payload (e.g., "max 800KB of images")
  • Number of HTTP requests (e.g., "max 50 requests")

Analogy: Like a baggage weight limit on a flight—straightforward to measure with a scale.

Timing-Based Budgets

Timing-based budgets set thresholds for actual user-experienced metrics:

  • LCP under 2.5 seconds
  • FID under 100 milliseconds
  • CLS under 0.1
  • Time to Interactive under 5 seconds

These directly reflect user experience but can vary by device and network conditions.

Analogy: Like promising customers "pizza delivered in 30 minutes"—what users actually care about.

Rule-Based Budgets

Rule-based budgets enforce best practices and technical standards:

  • Lighthouse performance score above 90
  • Zero render-blocking resources
  • All images must be compressed and use modern formats
  • CSS must be minified

These act as guardrails to prevent common performance mistakes before they impact metrics.

Analogy: Like a building code inspection—ensuring you're following proven practices.

Which Should You Use?

Most teams start with quantity-based budgets (easy to measure), add timing-based budgets for critical metrics (LCP, CLS), and supplement with rule-based budgets as guardrails.

Key Takeaway: Performance budgets come in three types—quantity-based (file sizes), timing-based (user metrics like LCP), and rule-based (best practices)—and using all three provides comprehensive performance governance.