Slide 1

Slide 1 text

Css Performance wh J Ron GHub’s 

Slide 2

Slide 2 text

Tnk y f comg

Slide 3

Slide 3 text

Th talk  abt Pfmce probms  GHub How  ce ft C  HTML C/HTML ols  GHub

Slide 4

Slide 4 text

brief about me J Ron’s 

Slide 5

Slide 5 text

Hello, I’m @JonRohan photo by Zachary Kaplan

Slide 6

Slide 6 text

I’m a Dign-gr

Slide 7

Slide 7 text

B.S. Comput Sce

Slide 8

Slide 8 text

8 yrs  C

Slide 9

Slide 9 text

I’m a GHu

Slide 10

Slide 10 text

photo by @janaboruta

Slide 11

Slide 11 text

Performance woes GHub’s 

Slide 12

Slide 12 text

Slow Scary GitHub

Slide 13

Slide 13 text

Slow Scary GitHub

Slide 14

Slide 14 text

I’m talkg abt diff pag

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

“a mium size diff”

Slide 17

Slide 17 text

~9,0 l acrs a fis 

Slide 18

Slide 18 text

~80%  pagoad  calcung

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

28.16s  calcute sty!

Slide 21

Slide 21 text

Wt caus sty calcung?

Slide 22

Slide 22 text

Mipung  DOM

Slide 23

Slide 23 text

Hidg usg  . display:  none; visibility:  hidden;

Slide 24

Slide 24 text

C Animns

Slide 25

Slide 25 text

Us Acs

Slide 26

Slide 26 text

A   bad ...

Slide 27

Slide 27 text

may cause brows h

Slide 28

Slide 28 text

Something went wrong while displaying this keynote To continue, press Reload or go to another talk.

Slide 29

Slide 29 text

trouble css GHub’s 

Slide 30

Slide 30 text

no uecsy tag iifis

Slide 31

Slide 31 text

   #navigation,    .menu  {    margin-­‐left:  0; } 1 2 3 4 ul ul

Slide 32

Slide 32 text

   #navigation,    .menu  {    margin-­‐left:  0; } 1 2 3 4

Slide 33

Slide 33 text

no crs

Slide 34

Slide 34 text

html  div  tr  td  {    font-­‐weight:  bold; } 1 2 3

Slide 35

Slide 35 text

html  div  tr  td  {    font-­‐weight:  bold; } 1 2 3 td

Slide 36

Slide 36 text

html  div  tr  td  {    font-­‐weight:  bold; } 1 2 3 tr  td

Slide 37

Slide 37 text

html  div  tr  td  {    font-­‐weight:  bold; } 1 2 3 html  div  tr  td

Slide 38

Slide 38 text

no univsal secrs

Slide 39

Slide 39 text

*  {    display:  block; } 1 2 3

Slide 40

Slide 40 text

no unqualifi secrs

Slide 41

Slide 41 text

[class^="mini-­‐icon-­‐"]  {    display:  block; } 1 2 3

Slide 42

Slide 42 text

no cg

Slide 43

Slide 43 text

                                       {    width:  30px; } 1 2 3 .small.private.icon

Slide 44

Slide 44 text

                                       {    width:  30px; } 1 2 3 .small-­‐private-­‐icon

Slide 45

Slide 45 text

r  imptce (wn y do c)

Slide 46

Slide 46 text

webk bug?

Slide 47

Slide 47 text

                 {    width:  30px; } 1 2 3 .foo.bar Iex  m_classRules u  key .foo

Slide 48

Slide 48 text

                 {    width:  30px; } 1 2 3 .bar.foo Iex  m_classRules u  key .bar

Slide 49

Slide 49 text

                                             {    width:  30px; } 1 2 3 input[type=text].error Iex  m_tagRules

Slide 50

Slide 50 text

                                             {    width:  30px; } 1 2 3 input.error[type=text] Iex  m_classRules

Slide 51

Slide 51 text

                 {    width:  30px; } 1 2 3 .bar#foo Iex  m_classRules

Slide 52

Slide 52 text

                 {    width:  30px; } 1 2 3 #foo.bar Iex  m_idRules

Slide 53

Slide 53 text

June July August September October November 4700 4875 5050 5225 5400 numb  c secrs

Slide 54

Slide 54 text

June July August September October November 4700 4875 5050 5225 5400 numb  c secrs

Slide 55

Slide 55 text

It’s a ve

Slide 56

Slide 56 text

C + HTML

Slide 57

Slide 57 text

HTML overload GHub’s 

Slide 58

Slide 58 text

how much html do we ve?

Slide 59

Slide 59 text

a typical diff le

Slide 60

Slide 60 text

   5    7            
       
+  this  is  a  line  in  the  diff
    1 2 3 4 5 6 7 8

Slide 61

Slide 61 text

avage diffs ve  ~9,0 l

Slide 62

Slide 62 text

>  $('#files_bucket  *').length

Slide 63

Slide 63 text

>  $('#files_bucket  *').length 48917

Slide 64

Slide 64 text

but ’s not a   probm

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

15ms pagoad

Slide 67

Slide 67 text

wt c we do?

Slide 68

Slide 68 text

duce  am  mcd html

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

solutions GHub’s 

Slide 71

Slide 71 text

k simp

Slide 72

Slide 72 text

move uecsy html

Slide 73

Slide 73 text

Ki  wh fi

Slide 74

Slide 74 text

   5    7            
       
+  this  is  a  line  in  the  diff
    1 2 3 4 5 6 7 8

Slide 75

Slide 75 text

   5    7            
       
+  this  is  a  line  in  the  diff
    1 2 3 4 5 6 7 8
+	
  this	
  is	
  a	
  line	
  in	
  the	
  diff

Slide 76

Slide 76 text

6,387 uecsy divs

Slide 77

Slide 77 text

Slide 78

Slide 78 text

   5    7            
       
+	
  this	
  is	
  a	
  line	
  in	
  the	
  diff
    1 2 3 4 5 6 7 8

Slide 79

Slide 79 text

   5    7            
       
+	
  this	
  is	
  a	
  line	
  in	
  the	
  diff
    1 2 3 4 5 6 7 8 5 7

Slide 80

Slide 80 text

Improv Rr spd by 37%

Slide 81

Slide 81 text

S! S!

Slide 82

Slide 82 text

   5    7            
       
+	
  this	
  is	
  a	
  line	
  in	
  the	
  diff
    1 2 3 4 5 6 7 8

Slide 83

Slide 83 text

   5    7            
       
+	
  this	
  is	
  a	
  line	
  in	
  the	
  diff
    1 2 3 4 5 6 7 8

Slide 84

Slide 84 text

3.5% spd improvemt

Slide 85

Slide 85 text

did  lp?

Slide 86

Slide 86 text

January February March April May June July August September October November 0 150 300 450 600 pagoad me st 12 ms

Slide 87

Slide 87 text

January February March April May June July August September October November 0 150 300 450 600 pagoad me st 12 ms

Slide 88

Slide 88 text

January February March April May June July August September October November 0 150 300 450 600 pagoad me st 12 ms

Slide 89

Slide 89 text

shortcuts GHub’s 

Slide 90

Slide 90 text

GHub Prim

Slide 91

Slide 91 text

facr c  usab compts

Slide 92

Slide 92 text

SWT! C

Slide 93

Slide 93 text

SWT! C secrs

Slide 94

Slide 94 text

SS  powful  dgs

Slide 95

Slide 95 text

button.classy,  a.button.classy, button.classy:disabled:hover,  a.button.classy.disabled:hover  {    border-­‐radius:  3px;    &.primary  {        color:  #fff;        &:hover  {  border-­‐color:  #4a993e;  }        &.mousedown  {  border-­‐bottom-­‐color:  darken(#8add6d,  10%);  }        &:disabled,  &.disabled  {            &,  &:hover  {                border-­‐color:  #74bb5a;            }        }    } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14

Slide 96

Slide 96 text

button.classy:disabled:hover. mousedown,a.button.classy:dis abled:hover.mousedown,a.butto n.classy.disabled:hover.mouse down...

Slide 97

Slide 97 text

Max  3 vs

Slide 98

Slide 98 text

Wow,  w sy

Slide 99

Slide 99 text

NOPE

Slide 100

Slide 100 text

GHub s grown

Slide 101

Slide 101 text

peop who ucd c

Slide 102

Slide 102 text

c vops

Slide 103

Slide 103 text

strat sucks!

Slide 104

Slide 104 text

GHub op like op srce

Slide 105

Slide 105 text

tools GHub’s 

Slide 106

Slide 106 text

C Exp

Slide 107

Slide 107 text

“Think of it like SQL EXPLAIN, but for CSS selectors.” - https://github.com/josh/css-explain

Slide 108

Slide 108 text

No content

Slide 109

Slide 109 text

>  cssExplain("li  .item") {    "selector":  "li  .item",    "parts":  ["li",  ".item"],    "specificity":  [0,  1,  1],    "category":  "class",    "key":  "item",    "score":  6 }

Slide 110

Slide 110 text

Webk Dev Tls

Slide 111

Slide 111 text

C Prir

Slide 112

Slide 112 text

No content

Slide 113

Slide 113 text

Time

Slide 114

Slide 114 text

No content

Slide 115

Slide 115 text

Auds

Slide 116

Slide 116 text

No content

Slide 117

Slide 117 text

No content

Slide 118

Slide 118 text

Graphe

Slide 119

Slide 119 text

“Graphite is a highly scalable real-time graphing system.” - http://graphite.wikidot.com/faq

Slide 120

Slide 120 text

cb (backd)

Slide 121

Slide 121 text

“Data collection agents connect to carbon and send their data...” - http://graphite.wikidot.com/carbon

Slide 122

Slide 122 text

whp (DB)

Slide 123

Slide 123 text

“It provides fast, reliable storage of numeric data over time.” - http://graphite.wikidot.com/whisper

Slide 124

Slide 124 text

T Graph S

Slide 125

Slide 125 text

No content

Slide 126

Slide 126 text

Graphs Evyw

Slide 127

Slide 127 text

No content

Slide 128

Slide 128 text

too long; didn’t read J Ron’s 

Slide 129

Slide 129 text

Simplifi C

Slide 130

Slide 130 text

Try  mimize HTML DOM mcs

Slide 131

Slide 131 text

Refacr  use C

Slide 132

Slide 132 text

Tmwk

Slide 133

Slide 133 text

Graph  M Evyg

Slide 134

Slide 134 text

Tnk Y @jonrohan You can find this presentation at http://speakerdeck.com/jonrohan