Slide 1

Slide 1 text

Establishing performance contexts Ian Feather - @ianfeather

Slide 2

Slide 2 text

Performance at ! !

Slide 3

Slide 3 text

We don’t know how important speed is to our users at a given time

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

It’s not that hard to get fast

Slide 9

Slide 9 text

It’s not that hard to get fast

Slide 10

Slide 10 text

It’s not that hard to get fast

Slide 11

Slide 11 text

It’s not that hard to get fast

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

You can use these techniques to optimise (to a certain extent)

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Total: weight: 674 KB ! 
 Until you scroll down the page…

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

!

Slide 18

Slide 18 text

Performance vs Design is all about compromise

Slide 19

Slide 19 text

Performance vs Design is all about compromise

Slide 20

Slide 20 text

You can only get as fast as the design allows

Slide 21

Slide 21 text

Performance Contexts

Slide 22

Slide 22 text

We have to accept there are things we don’t know

Slide 23

Slide 23 text

We are constantly required to make assumptions…

Slide 24

Slide 24 text

Assumption 1: Users on mobile devices want a different experience to those on desktop

Slide 25

Slide 25 text

Assumption 1: Users on mobile devices want a different experience to those on desktop Viewport !== context
 Viewport !== network

Slide 26

Slide 26 text

Assumption 2: Users want every site to load within X seconds

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

Assumption 2: Users want every site to load within X seconds Users want a site to load in-line with their expectations

Slide 32

Slide 32 text

Serving the same experience across multiple unknowns is a compromise

Slide 33

Slide 33 text

Currently we don’t have the tools to do anything about this

Slide 34

Slide 34 text

But… ! The Web is for everyone

Slide 35

Slide 35 text

How can we determine a user’s performance context?

Slide 36

Slide 36 text

Why not ask them?

Slide 37

Slide 37 text

Hostel Mode

Slide 38

Slide 38 text

http://blog.chriszacharias.com/page-weight-matters

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

“We even burned through our monthly data plans in 40 minutes.”

Slide 41

Slide 41 text

Light
 Mode Default

Slide 42

Slide 42 text

Segmenting in to two ‘modes’ can be very powerful but…

Slide 43

Slide 43 text

Are we still making assumptions?

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

Did we ever ask users with retina screens if they want a slower experience?

Slide 46

Slide 46 text

And are we still compromising?

Slide 47

Slide 47 text

We can’t leverage the best of the platform… whilst limiting page weight.

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

Light
 Mode Default

Slide 50

Slide 50 text

Light
 Mode Default Enhanced

Slide 51

Slide 51 text

Segmenting allows us to design focused User Experiences

Slide 52

Slide 52 text

Asking the user

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

How could this look?

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

Implementation Advice

Slide 62

Slide 62 text

Don’t build three different websites!

Slide 63

Slide 63 text

Abstract out the development complexity

Slide 64

Slide 64 text

if('querySelector' in document && 'localStorage' in window && 'addEventListener' in window && 'classList' in document.documentElement && 
 lpHostelMode() !== "light") {
 } Global feature switches

Slide 65

Slide 65 text

{{ moduleTitle }}

{{ img_tag(moduleImage) }}

{{ moduleContent }}

Authoring must stay the same

Slide 66

Slide 66 text

def img_tag(image_url, opts={}) return if @hostelMode ! image_tag(image_url, opts) end Use helpers to abstract switches

Slide 67

Slide 67 text

Stateless vs Stateful

Slide 68

Slide 68 text

Consider the preloader

Slide 69

Slide 69 text

Future: Could the browser expose these user options?

Slide 70

Slide 70 text

Recap

Slide 71

Slide 71 text

You can only get as fast as the design allows

Slide 72

Slide 72 text

Your application may be entirely inaccessible to parts of the world

Slide 73

Slide 73 text

Segmenting the user experience can be very powerful

Slide 74

Slide 74 text

Don’t guess. Ask.

Slide 75

Slide 75 text

Don’t do it at the expense of complexity

Slide 76

Slide 76 text

Thank you Ian Feather - @ianfeather

Slide 77

Slide 77 text

Creative Commons ! ! ! Arrano : https://flic.kr/p/4WjZDf Patrick Quinn-Graham (thepatrick): https://flic.kr/p/Tk4Ha Leonardo Rizzi (L1010913): https://flic.kr/p/cVRiZm