Performance budgets have been around for more than ten years. Over those years, we’ve learned a lot about what works, what doesn’t, and what we need to improve. In this session, I revisit old assumptions about performance budgets and offers some new practices. Topics include:
• Aligning budgets with user experience
• Pros and cons of Core Web Vitals
• Budgets for beginners
6. How fast should my pages be
to keep my visitors happy?
How can I make sure they stay
fast?
7.
8. 2009 Improved average load time from 6s 1.2s
7-12% increase in conversion rate + 25% increase in PVs
Average load time degraded to 5s
User feedback: “I will not come back to this site again.”
Re-focused on performance
0.4% increase in conversion rate
2010
2011
2009
@tameverts
9. 1. Constant feature development
2. Badly implemented third-parties
3. Waited too long to tackle problems
4. Relied on performance sprints
5. Stopped doing front-end performance measurement
6. No way to track regressions
@tameverts
10.
11. What is a performance budget?
Which metrics should I focus on?
What should my budget thresholds be?
How can I stay on top of my budgets?
@tameverts
16. Thresholds YOU create for metrics
that are meaningful for YOUR site
Milestone timings • e.g. Start Render, Largest Contentful Paint
Quantity-based • e.g. Page size, image weight, Long Tasks
Score-based • e.g. Cumulative Layout Shift, Lighthouse scores
@tameverts
17. A good performance
budget
should show you…
What your budget is
When you go out of bounds
How long you’re out of bounds
When you’re back within budget
@tameverts
19. Performance budget tools
Synthetic (lab)
Mimics defined network & browser conditions
No installation required
Limited URLs
Limited test locations
Compare any sites
Detailed analysis & visuals
Real user monitoring (field)
Real network & browser conditions
Requires JavaScript installation
Large sample size (up to 100%)
Geographic spread
Only measure your own site
Correlation with other metrics (e.g., bounce rate)
@tameverts
27. Is the page loading?
Can I use it?
How does it feel?
28. ❑ Tracks the most important content
❑ Is accessible out of the box
❑ Is available in synthetic and RUM
❑ Can be correlated to UX and business metrics
❑ Has broad browser support
The ideal UX metric…
@tameverts
34. ❑ Tracks the most important content
❑ Is accessible out of the box
❑ Has broad browser support
❑ Is available in synthetic and RUM
❑ Can be correlated to UX and business metrics
√
√
√
Backend time
√
35. Start Render
The time from the start of navigation
until the first non-white content is painted
Synthetic & RUM
36.
37. As Start Render improves, so does bounce rate (typically)
@tameverts
39. ❑ Tracks the most important content
❑ Is accessible out of the box
❑ Has broad browser support
❑ Is available in synthetic and RUM
❑ Can be correlated to UX and business metrics
√
√
√
Start Render
√
√
@tameverts
49. ❑ Tracks the most important content
❑ Is accessible out of the box
❑ Has broad browser support
❑ Is available in synthetic and RUM
❑ Can be correlated to UX and business metrics
√
√
Largest Contentful Paint
√
√
@tameverts
52. Cumulative Layout Shift (CLS)
Aggregate score that reflects
how much page elements shift
during rendering
Synthetic & RUM
53.
54. Bounce rate gets worse as CLS degrades
Bounce rate improves as CLS degrades
Bounce rate stays the same as CLS degrades
speedcurve.com/blog/google-cumulative-layout-shift/
55. ❑ Tracks the most important content
❑ Is accessible out of the box
❑ Has broad browser support
❑ Is available in synthetic and RUM
❑ Can be correlated to UX and business metrics
√
√
Cumulative Layout Shift
@tameverts
√
56. First Input Delay (FID)
Amount of time it takes for the page
to respond to user input
(e.g., click, tap, key)
RUM
57. No correlation when looking at all sessions
speedcurve.com/blog/first-input-delay-google-core-web-vitals/
@tameverts
58. Stronger correlation at 75th percentile
speedcurve.com/blog/first-input-delay-google-core-web-vitals/
@tameverts
59. ❑ Tracks the most important content
❑ Is accessible out of the box
❑ Has broad browser support
❑ Is available in synthetic and RUM
❑ Can be correlated to UX and business metrics
√
First Input Delay
@tameverts
60. Long Tasks
Any JavaScript function that takes >50ms to execute
Long tasks don’t always block page rendering,
but they can cause page jank
Synthetic & RUM
64. Interaction to Next Paint (INP)
Measures a page's responsiveness
to individual user interactions
Observes latency and reports a single value which all
(or nearly all) interactions were below
RUM
66. Element Timing
Measures when specified DOM elements are rendered (and
works in SPAs)
You decide which element(s) you want to measure
RUM & Synthetic
68. Meaningful
content
Usable out of
the box
Broad browser
support
Synthetic RUM
Correlates to
business/UX
Time to First Byte ★ ★ ★ ★ ☆
Start Render ☆ ★ ★ ★ ★ ★
Largest Contentful Paint ☆ ★ ★ ★ ★
Cumulative Layout Shift ☆ ☆ ★ ★
First Input Delay ★ ★
Long Tasks ★ ★ ★ ★ ☆
Interaction to Next Paint ☆ ★
Element Timing ★ ★ ★ ★ ★
@tameverts
69. Meaningful
content
Usable out of
the box
Broad browser
support
Synthetic RUM
Correlates to
business/UX
Time to First Byte ★ ★ ★ ★ ☆
Start Render ☆ ★ ★ ★ ★ ★
Largest Contentful Paint ☆ ★ ★ ★ ★
Cumulative Layout Shift ☆ ☆ ★ ★
First Input Delay ★ ★
Long Tasks ★ ★ ★ ★ ☆
Interaction to Next Paint ☆ ★
Element Timing ★ ★ ★ ★ ★
@tameverts
73. Goals are aspirational
How fast do I want to be eventually?
Budgets are pragmatic
How can I keep my site from getting slower
while I work toward my goals?
@tameverts
97. Everyone* who touches a page
should understand the performance
impact of their choices
*Yes, this includes marketing people
98. “One of the original directives
of the performance team
was we weren’t going
to set ourselves up
to be performance cops.”
Dan Chilton, Vox Media
responsivewebdesign.com/podcast/vox-media-performance/
99. Our goals
• Set up best practices
• Make recommendations
• Be a resource within the company
that people can turn to when they
have to make performance-related decisions
Dan Chilton, Vox Media
responsivewebdesign.com/podcast/vox-media-performance/
100.
101. 1. Start small (even a single metric will do!)
2. Visually validate your metrics (filmstrips, videos)
3. Validate your metrics some more (UX, business)
4. Get buy-in from different stakeholders
5. Focus on the pages that matter most
6. Revisit your budgets regularly (2-4 weeks)
7. Remember that metrics are always evolving
8. Never stop measuring
103. Performance Budgets 101
support.speedcurve.com/docs/performance-budgets-101
Setting a Performance Budget
timkadlec.com/2013/01/setting-a-performance-budget/
Performance Budgets, Pragmatically
csswizardry.com/2020/01/performance-budgets-pragmatically/
Web Vitals
web.dev/vitals/
Element Timing: One true metric to rule them all?
speedcurve.com/blog/element-timing-one-true-metric/
First Input Delay: How vital is it?
speedcurve.com/blog/first-input-delay-google-core-web-vitals/
Cumulative Layout Shift: What it measures (and what it doesn’t)
speedcurve.com/blog/google-cumulative-layout-shift/