1 of 47

2 of 47

Making our websites

load faster

Pearl Latteier, Lunch and Learn, Sep 1 2020

3 of 47

4 of 47

WHY?

5 of 47

6 of 47

52%

Desktop vs Mobile Market Share Worldwide - July 2020

http://gs.statcounter.com/platform-market-share/desktop-mobile/worldwide/

48%

7 of 47

Web Self-Enrollment

Between 60% - 90+%

of users are on mobile

Source: Leah

8 of 47

Not all users have iPhones

9 of 47

Second largest market

for sub-$100 devices

is the USA

10 of 47

Mobile Devices, 8/24/20, #browserdevicedata

50% android

11 of 47

Average site load time on mobile:

19 sec

More than 50% of users leave after:

3 sec

12 of 47

Sites retain more users and increase conversions as speed increases

13 of 47

Why?

Speed helps us succeed

14 of 47

WHAT?

15 of 47

16 of 47

TTI < 5 sec

for a mid-range phone on 3G on first load

Goal:

17 of 47

Data from Lighthouse

WEBSITE

TTI

signup.propellerhealth.com

11s

patient.propellerhealth.com

8.5s

provider-nvspocs.propellerhealth.eu

6.5s

18 of 47

Size of JavaScript

to download and parse

19 of 47

The median web page sends

> 350 KB JavaScript (compressed)

to users’ phones

20 of 47

For a TTI < 5 sec, shoot for

< 170 KB JavaScript (compressed)

21 of 47

Data from chrome dev tools

WEBSITE

KB of JS downloaded on first load

signup.propellerhealth.com

660 (~50% Segment, GA, SF etc)

patient.propellerhealth.com

270

provider-nvspocs.propellerhealth.eu

210 (~30% Segment)

22 of 47

JavaScript

execution time

23 of 47

Size and number of images and other assets

24 of 47

Cost to users:

Data

Battery

Processing time

25 of 47

Big and/or deeply nested

DOM tree

26 of 47

Size of CSS

27 of 47

What?

Many things can slow down TTI

28 of 47

HOW?

29 of 47

Measure, then optimize

30 of 47

Measure on device

31 of 47

webpagetest.org/easy

32 of 47

Lighthouse

33 of 47

34 of 47

Code Splitting

35 of 47

36 of 47

37 of 47

Lazy loading

38 of 47

39 of 47

Optimize Rendering

40 of 47

CSSOM Tree

DOM Tree

Render Tree

Layout

Paint

Critical Rendering Path

41 of 47

Website Performance Optimization Udacity course

https://www.udacity.com/course/website-performance-optimization--ud884

42 of 47

Service Worker Caching

43 of 47

44 of 47

45 of 47

Performance Budget

46 of 47

Pick the metric you care about -- TTI or something else -- and track it

47 of 47

Resources