Slide 1

Slide 1 text

SPEED MATTERS

Slide 2

Slide 2 text

100ms 1s 10s Response Time in Man-computer Conversational Transactions Robert B. Miller, 1968 Instant Seamless Yawn! Our perception of response time 3s - Recommended Load Time 6.5s - Alexa 2000 Fall 2012 Miller Response Time 1968

Slide 3

Slide 3 text

Bing did some experiments +1s - 2.8% +1s $/ Time to click +2s Bing

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Walmart Wallmart made some improvements -1s +2%

Slide 6

Slide 6 text

Shopzilla http://velocityconf.com/velocity2009/public/schedule/detail/7709 $$$ +12% +25% -50% From 6-9s down to 1.2s

Slide 7

Slide 7 text

Strangeloop Networks

Slide 8

Slide 8 text

Strangeloop Networks

Slide 9

Slide 9 text

Strangeloop Networks

Slide 10

Slide 10 text

The network

Slide 11

Slide 11 text

1 2 3 4 5 6 7 8 9 10 1.36s 1.37s 1.38s 1.39s 1.41s 1.44s 1.50s 1.63s 1.95s 3.11s Page Load Time Bandwidth (Mbps) Bandwidth doesn’t matter (much)

Slide 12

Slide 12 text

300k image downloading slowed 40x Browser Server

Slide 13

Slide 13 text

Minimum round trips to download a file 71kB 143kB 214kB 285kB 1 2 3 4 5 6 7 8 9 10 11 (TCP Segments) Round Trips Size

Slide 14

Slide 14 text

Impact of latency 1 2 3 4 0 20 40 60 80 100 120 140 160 180 200 220 240 Page Load Time (s) Round Trip Time (ms)

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

The front-end really matters

Slide 17

Slide 17 text

80% of time is front-end news.bbc.co.uk ebay.co.uk debenhams.co.uk direct.gov.uk amazon.co.uk mumsnet.com guardian.co.uk 0 1 2 3 4 5 Backend Frontend

Slide 18

Slide 18 text

Still got to fix the backend!

Slide 19

Slide 19 text

327k (32%) bigger in one year

Slide 20

Slide 20 text

Onload ≠ User perception 2.0s 88% rendered 5.2s window.onload

Slide 21

Slide 21 text

So how do we measure speed?

Slide 22

Slide 22 text

Uptime monitoring (Pingdom)

Slide 23

Slide 23 text

Synthetic testing

Slide 24

Slide 24 text

Only the HTML request measured

Slide 25

Slide 25 text

Real user monitoring (RUM)

Slide 26

Slide 26 text

New Relic RUM

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

APDEX

Slide 29

Slide 29 text

GA site speed

Slide 30

Slide 30 text

GA site speed

Slide 31

Slide 31 text

GA site speed

Slide 32

Slide 32 text

GA Site speed sample rate var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXX-XX']); _gaq.push(['_setSiteSpeedSampleRate', 100]); _gaq.push(['_trackPageview']);

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

1 2 3 4 5 6 10 8 9 4 11 13 12 7 14 7

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

GA User timing _gaq.push([‘_trackTiming’, ‘jQuery’,‘Load Library’, 20, ‘Google CDN’,50]);

Slide 39

Slide 39 text

GA User timing

Slide 40

Slide 40 text

GA User timing

Slide 41

Slide 41 text

Performance benchmarking

Slide 42

Slide 42 text

How do I make it faster?

Slide 43

Slide 43 text

Google PageSpeed Insight

Slide 44

Slide 44 text

WebPagetest

Slide 45

Slide 45 text

stevesouders.com/hpws/

Slide 46

Slide 46 text

browserdiet.com

Slide 47

Slide 47 text

How do I make it faster across all those devices?

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

Responsive Design

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

1. Build mobile first responsive designs 2. Keep CSS background images in scoped media queries 3. Conditionally load JavaScript and even HTML fragments based on screen size and capabilities 4. Implement a responsive images solution 5. Handle retina images very carefully and err on the side of performance Jason Grigsby

Slide 52

Slide 52 text

Responsive Images using Picturefill & WebP

Slide 53

Slide 53 text

Dynamic image generation

Slide 54

Slide 54 text

CSS focal point Adam Bradley

Slide 55

Slide 55 text

github.com/blog/ Adaptive Design

Slide 56

Slide 56 text

Device detection (WURFL)

Slide 57

Slide 57 text

Going mobile first is harder than you think

Slide 58

Slide 58 text

igvita.com

Slide 59

Slide 59 text

igvita.com

Slide 60

Slide 60 text

igvita.com

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

speedcurve.com @markzeman