Slide 1

Slide 1 text

Web Performance 101 What is web performance and why should I care? @tameverts #ChromeDevSummit ¯\_(ツ)_/¯

Slide 2

Slide 2 text

@tameverts

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

speedcurve.com/benchmarks/

Slide 6

Slide 6 text

What is “web performance”? Why should I care about it? How do I measure it? How can I get other people in my company to care about it?

Slide 7

Slide 7 text

“web performance” Is it loading? Can I use it? How does it feel?

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

75th percentile of page loads across mobile and desktop

Slide 10

Slide 10 text

wsj.com/articles/google-search-ramps-up-penalties-for-slow-annoying-websites-11628614350

Slide 11

Slide 11 text

2016 The internet is a basic human right.

Slide 12

Slide 12 text

Poor performance hurts a LOT of people.

Slide 13

Slide 13 text

People in rural areas People in Indigenous communities People with lower incomes Children Seniors People with accessibility challenges People in developing countries

Slide 14

Slide 14 text

@tameverts

Slide 15

Slide 15 text

That’s 15,000,000 people in the US alone.

Slide 16

Slide 16 text

1 out of 3 homes in the US do not have broadband access. (25 Mbps down and 3 Mbps up) Federal Communications Commission, 2020 @tameverts

Slide 17

Slide 17 text

That’s 45,000,000 homes. And 12,000,000 children (many of whom are now learning remotely).

Slide 18

Slide 18 text

theverge.com/22177154/us-internet-speed-maps-competition-availability-fcc

Slide 19

Slide 19 text

“the homework gap”

Slide 20

Slide 20 text

75% of Indigenous communities in Canada do not have access to broadband. @tameverts

Slide 21

Slide 21 text

Education Entrepreneurialism Social connection Governance Telemedicine

Slide 22

Slide 22 text

“I grew up with our community being under constant boil water advisories, and I wasn’t able to safely drink water out of the tap until just a few years ago. High-speed internet feels equally life changing.” Chief Willie Sellars, 2020

Slide 23

Slide 23 text

We can’t fix our networks, but we can fix our pages.

Slide 24

Slide 24 text

2106kb HTTP Archive, October 2021

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

Big pages cost users.

Slide 27

Slide 27 text

whatdoesmysitecost.com

Slide 28

Slide 28 text

whatdoesmysitecost.com

Slide 29

Slide 29 text

Performance isn’t just about speed.

Slide 30

Slide 30 text

Page jank affects people with motor skill challenges (esp. on mobile). Assistive technology (e.g., screenreaders) may not work until the DOM fully loads. JavaScript can block assistive tech. @marcysutton

Slide 31

Slide 31 text

Users aged 65 and older are 43% slower at using websites than users aged 21-55. nngroup.com/articles/usability-for-senior-citizens/ @tameverts

Slide 32

Slide 32 text

business behaviour brain

Slide 33

Slide 33 text

Brain

Slide 34

Slide 34 text

The average web user believes they waste two days a year waiting for pages to load.

Slide 35

Slide 35 text

Stoyan Stefanov, The Psychology of Speed

Slide 36

Slide 36 text

Nielsen Norman Group, 1993 & 2010

Slide 37

Slide 37 text

37 “We want you to be able to flick from one page to another as quickly as you can flick a page on a book. So, we’re really aiming very, very high here… at something like 100 milliseconds.” Urs Hölzle SVP Engineering, Google

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

“web stress” When apps or sites are slow, we have to concentrate up to 50% harder to stay on task. @tameverts

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

Radware, 2013 Frustration peaks between 11.5 and 26% during browsing and checkout @tameverts

Slide 42

Slide 42 text

Behaviour

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

“Phone rage”: How people react to slow mobile sites Tealeaf/Harris Interactive, 2011 @tameverts

Slide 45

Slide 45 text

45 When do we start to interact with a page? Radware, 2014 @tameverts

Slide 46

Slide 46 text

46 Source: Jakob Nielsen

Slide 47

Slide 47 text

nicj.net/measuring-continuity/

Slide 48

Slide 48 text

nicj.net/measuring-continuity/

Slide 49

Slide 49 text

Business

Slide 50

Slide 50 text

User experience and web performance are predictable indicators of business outcomes.

Slide 51

Slide 51 text

❑ bounce rate ❑ cart size ❑ conversions ❑ revenue ❑ time on site ❑ page views ❑ SEO ❑ brand perception ❑ user retention ❑ competitors

Slide 52

Slide 52 text

WPOsta ts.com

Slide 53

Slide 53 text

Bounce rate

Slide 54

Slide 54 text

@tameverts

Slide 55

Slide 55 text

WPOstats.com

Slide 56

Slide 56 text

Conversions

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

Every 1 second of load time improvement equaled a 2% conversion rate increase for Walmart Staples shaved 1 second from median load time, improved conversion rate by 10% Fanatics cut median load times by 2 seconds, almost doubled mobile conversions

Slide 59

Slide 59 text

User retention

Slide 60

Slide 60 text

Strangeloop, 2011 @tameverts

Slide 61

Slide 61 text

Brand perception

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

fast slow @tameverts

Slide 64

Slide 64 text

Content “boring” Visual design “tacky” “confusing” Ease of navigation “frustrating” “hard-to-navigate”

Slide 65

Slide 65 text

SEO

Slide 66

Slide 66 text

https://www.forbes.com/sites/theyec/2021/09/22/google-seo-updates-for-2021-lcp-fcp-fid-cls-oh-my/

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

40% decrease in wait time 15% increase in signup conversion rate 15% increase in SEO traffic

Slide 69

Slide 69 text

Good pages rank slightly (1%) better than average. Slow pages rank significantly (3.7%) worse. sistrix.com/blog/core-web-vitals-is-a-measurable-ranking-factor/

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

How fast should I be? How do I stay on track?

Slide 72

Slide 72 text

Performance budgets FTW!

Slide 73

Slide 73 text

Threshold YOU create for metrics that are meaningful for YOUR site Milestone timings (e.g. Start Render) Quantity-based (e.g. image weight) Rules-based (e.g. Lighthouse scores)

Slide 74

Slide 74 text

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

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

Why do I need them?

Slide 77

Slide 77 text

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 @tameverts

Slide 78

Slide 78 text

1. No front-end measurement 2. Constant feature development 3. Badly implemented third-parties 4. Waited too long to tackle problems 5. Relied on performance sprints 6. No way to track regressions

Slide 79

Slide 79 text

1. Which metrics should I focus on? 2. What should my budget thresholds be? 3. How do I stay on top of them?

Slide 80

Slide 80 text

Which metrics should I focus on?

Slide 81

Slide 81 text

No content

Slide 82

Slide 82 text

TTFB DNS TCP TTI FCP FMP FID OMG WTF

Slide 83

Slide 83 text

Is it loading? Can I use it? How does it feel?

Slide 84

Slide 84 text

What tools can we use? Synthetic (lab) Consistent baseline Mimics network & browser conditions No installation Compare any sites Detailed analysis Waterfall charts Filmstrips and videos Limited URLs Real user monitoring (field) Requires JavaScript installation Large sample size (up to 100%) Real network & browser conditions Geographic spread Correlation with other metrics (bounce rate) No detailed analysis Only measure your own site

Slide 85

Slide 85 text

No content

Slide 86

Slide 86 text

No content

Slide 87

Slide 87 text

No content

Slide 88

Slide 88 text

No content

Slide 89

Slide 89 text

@tameverts

Slide 90

Slide 90 text

@tameverts

Slide 91

Slide 91 text

@tameverts

Slide 92

Slide 92 text

Is it loading?

Slide 93

Slide 93 text

Time to First Byte AKA backend time Synthetic & RUM

Slide 94

Slide 94 text

Start Render The time from the start of the initial navigation until the first non-white content is painted Synthetic & RUM

Slide 95

Slide 95 text

No content

Slide 96

Slide 96 text

No content

Slide 97

Slide 97 text

Can I use it?

Slide 98

Slide 98 text

98 When do users start to interact with a page? @tameverts

Slide 99

Slide 99 text

Amount of time it takes for the largest visual element to render Synthetic & RUM

Slide 100

Slide 100 text

No content

Slide 101

Slide 101 text

Alternative: Last Painted Hero

Slide 102

Slide 102 text

How does it feel?

Slide 103

Slide 103 text

Score that reflects how much page elements shift during rendering. Available in Chrome and Chromium-based browsers. Synthetic & RUM

Slide 104

Slide 104 text

No content

Slide 105

Slide 105 text

Size of the shifting element matters speedcurve.com/blog/visualising-cls-layout-shifts/

Slide 106

Slide 106 text

Image carousels can generate false positives speedcurve.com/blog/visualising-cls-layout-shifts/

Slide 107

Slide 107 text

Web fonts & opacity changes can cause issues speedcurve.com/blog/visualising-cls-layout-shifts/

Slide 108

Slide 108 text

Amount of time it takes for page to respond to user input (e.g. click, tap, key) Only measurable via RUM

Slide 109

Slide 109 text

FID can seem fast because user interactions take place later in the page’s rendering cycle... after CPU-hogging long tasks have completed. speedcurve.com/blog/first-input-delay-google-core-web-vitals/

Slide 110

Slide 110 text

No correlation when looking at all sessions speedcurve.com/blog/first-input-delay-google-core-web-vitals/

Slide 111

Slide 111 text

Stronger correlation at 75th percentile speedcurve.com/blog/first-input-delay-google-core-web-vitals/

Slide 112

Slide 112 text

Long Tasks Measures JavaScript functions that take 50ms or longer. Long or excessive JS tasks can delay rendering, as well as cause page “jank”. Measurable across browser types. Synthetic & RUM

Slide 113

Slide 113 text

No content

Slide 114

Slide 114 text

Long Tasks have a high correlation to conversions speedcurve.com/blog/first-input-delay-google-core-web-vitals/

Slide 115

Slide 115 text

Other metrics to consider

Slide 116

Slide 116 text

Custom metrics Measure performance with high-precision timestamps Synthetic & RUM https://www.w3.org/TR/user-timing/ https://speedcurve.com/blog/user-timing-and-custom-metrics/

Slide 117

Slide 117 text

How long does it take to display the main product image on my site?

Slide 118

Slide 118 text

Time to First Tweet The time from clicking the link to viewing the first tweet on each page’s timeline Pinner Wait Time (PWT) The time from initiating an action (e.g., tapping a pin) until the action is complete (pin close-up view is loaded) Time to Interact (TTI)

Slide 119

Slide 119 text

No content

Slide 120

Slide 120 text

Lighthouse Scores based on audits run on synthetic tests. Checks your page against “rules” for Performance, PWA, Best Practices, and SEO. For each category, you get a score out of 100 and recommendations for what to fix. developers.google.com/web/tools/lighthouse

Slide 121

Slide 121 text

No content

Slide 122

Slide 122 text

No content

Slide 123

Slide 123 text

matuzo.at/blog/building-the-most-inaccessible-site-possible- with-a-perfect-lighthouse-score/

Slide 124

Slide 124 text

Page size & requests Avoid serving huge pages to mobile!

Slide 125

Slide 125 text

No content

Slide 126

Slide 126 text

zillow.com/tech/bigger-faster-more-engaging-budget/

Slide 127

Slide 127 text

Third parties Long tasks time Total size Total number of requests

Slide 128

Slide 128 text

No content

Slide 129

Slide 129 text

Metrics to watch for… Responsiveness https://web.dev/responsiveness/ Smoothness https://web.dev/smoothness/

Slide 130

Slide 130 text

What should my budget thresholds be?

Slide 131

Slide 131 text

Performance budgets ≠ Performance goals

Slide 132

Slide 132 text

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?

Slide 133

Slide 133 text

Priority 1 Create budgets to fight regression

Slide 134

Slide 134 text

Look at your last 2-4 weeks of data. Identify your worst number.

Slide 135

Slide 135 text

Priority 2 Set long-term goals

Slide 136

Slide 136 text

How fast are my competitors? speedcurve.com/benchmarks/

Slide 137

Slide 137 text

No content

Slide 138

Slide 138 text

How can I improve business metrics?

Slide 139

Slide 139 text

How can I improve SEO? @tameverts

Slide 140

Slide 140 text

@tameverts

Slide 141

Slide 141 text

“The largest hurdle to creating and maintaining stellar site performance is the culture of your organization. Lara Hogan designingforperformance.com

Slide 142

Slide 142 text

“No matter the size or type of team, it can be a challenge to educate, incentivize, and empower those around you. “Performance more often comes down to a cultural challenge, rather than simply a technical one.” Lara Hogan designingforperformance.com

Slide 143

Slide 143 text

How to create a culture of performance

Slide 144

Slide 144 text

1. Have a champion higher up

Slide 145

Slide 145 text

No content

Slide 146

Slide 146 text

2. Build a cross-disciplinary team

Slide 147

Slide 147 text

No content

Slide 148

Slide 148 text

Everyone who touches a page should care about the performance of that page.

Slide 149

Slide 149 text

Embrace performance from the ground up. Embed engineers into other teams. Enlist performance ambassadors. Teach people how to use (or at least understand) the monitoring tools you use.

Slide 150

Slide 150 text

3. Set shared goals

Slide 151

Slide 151 text

It’s perilously easy to accidentally become a gatekeeper.

Slide 152

Slide 152 text

We first went to the engineering leaders, and then we went to our product leader. Our pitch was totally different... Reefath Rajali // PayPal chasingwaterfalls.io/episodes/episode-two-with-reefath-rajali/

Slide 153

Slide 153 text

“When we went to our product leaders, we spoke more about the business numbers and the business benefits. “When we spoke to our engineering leaders, it was more about our consumer delight.” Reefath Rajali // PayPal chasingwaterfalls.io/episodes/episode-two-with-reefath-rajali/

Slide 154

Slide 154 text

Find out what people care about.

Slide 155

Slide 155 text

❑ bounce rate ❑ cart size ❑ conversions ❑ revenue ❑ time on site ❑ page views ❑ SEO ❑ user happiness ❑ user retention ❑ competitors

Slide 156

Slide 156 text

If they care about business metrics…

Slide 157

Slide 157 text

No content

Slide 158

Slide 158 text

No content

Slide 159

Slide 159 text

No content

Slide 160

Slide 160 text

No content

Slide 161

Slide 161 text

If they care about user engagement…

Slide 162

Slide 162 text

No content

Slide 163

Slide 163 text

No content

Slide 164

Slide 164 text

If they care about SEO…

Slide 165

Slide 165 text

No content

Slide 166

Slide 166 text

If they care about third parties…

Slide 167

Slide 167 text

No content

Slide 168

Slide 168 text

No content

Slide 169

Slide 169 text

Who they are What they care about What to show them Executives Competition Business impact Benchmarks (filmstrips and videos) Correlation charts (perf + KPIs) Marketing Third parties Traffic + engagement SEO Content Third-party performance Correlation charts (perf + bounce rate) Lighthouse SEO audits Image size Devs / engineers Well, lots of stuff, probably Consult with perf team @tameverts

Slide 170

Slide 170 text

4. Make everyone accountable

Slide 171

Slide 171 text

Performance budgets FTW!

Slide 172

Slide 172 text

Give people ownership

Slide 173

Slide 173 text

“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/

Slide 174

Slide 174 text

“We weren’t going to go around slapping people on the wrist, saying, ‘You built an article that broke the page size budget! You have to take that down or change that immediately!’ “Our goal setting out was to set up best practices, make recommendations, and 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/

Slide 175

Slide 175 text

5. Communicate

Slide 176

Slide 176 text

No content

Slide 177

Slide 177 text

“We, as engineers, should learn how to show the impact on anything we do.” Malek Hakim // Priceline chasingwaterfalls.io/episodes/episode-one-with-malek-hakim/

Slide 178

Slide 178 text

No content

Slide 179

Slide 179 text

No content

Slide 180

Slide 180 text

No content

Slide 181

Slide 181 text

No content

Slide 182

Slide 182 text

No content

Slide 183

Slide 183 text

6. Score some easy wins

Slide 184

Slide 184 text

“The dull boring stuff” ~Andy Davies Scripts (especially third parties) Images Extraneous code Defer assets where possible

Slide 185

Slide 185 text

Shaved 15KB off logo Ran A/B test Increased bookings chasingwaterfalls.io/episodes/episode-one-with-malek-hakim/

Slide 186

Slide 186 text

6. Don’t forget to celebrate!

Slide 187

Slide 187 text

No content

Slide 188

Slide 188 text

No content

Slide 189

Slide 189 text

No content

Slide 190

Slide 190 text

!!!

Slide 191

Slide 191 text

medium.com/the-telegraph-engineering

Slide 192

Slide 192 text

In summary…

Slide 193

Slide 193 text

There’s no magic. Show up with a plan. Do the work. Always be measuring. Keep doing the work. (Be patient.)

Slide 194

Slide 194 text

Thanks! @tameverts