GitHub's CSS Performance

Speaker Deck

3 min read Original article ↗
  1. Css Performance wh J Ron GHub’s 

  2. Tnk y f comg

  3. brief about me J Ron’s 

  4. Hello, I’m @JonRohan photo by Zachary Kaplan

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

  6. B.S. Comput Sce

  7. 8 yrs  C

  8. I’m a GHu

  9. photo by @janaboruta

  10. Performance woes GHub’s 

  11. Slow Scary GitHub

  12. Slow Scary GitHub

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

  14. “a mium size diff”

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

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

  17. 28.16s  calcute sty!

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

  19. Mipung  DOM

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

  21. C Animns

  22. Us Acs

  23. A   bad ...

  24. may cause brows h

  25. trouble css GHub’s 

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

  27. no crs

  28. no univsal secrs

  29. *  {    display:  block; } 1 2 3

  30. no unqualifi secrs

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

  32. no cg

  33.                    

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

  34.                    

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

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

  36. webk bug?

  37.                  {  

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

  38.                  {  

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

  39.                    

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

  40.                    

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

  41.                  {  

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

  42.                  {  

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

  43. It’s a ve

  44. C + HTML

  45. HTML overload GHub’s 

  46. how much html do we ve?

  47. a typical diff le

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

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

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

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

  52. 15ms pagoad

  53. wt c we do?

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

  55. solutions GHub’s 

  56. k simp

  57. move uecsy html

  58. Ki  wh fi

  59. 6,387 uecsy divs

  60. move <a> f le numbs

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

  62. <b>S! <b>S!

  63. 3.5% spd improvemt

  64. did  lp?

  65. shortcuts GHub’s 

  66. GHub Prim

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

  68. SWT! C

  69. SWT! C secrs

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

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

  72. Max  3 vs

  73. Wow,  w sy

  74. NOPE

  75. GHub s grown

  76. peop who ucd c

  77. c vops

  78. strat sucks!

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

  80. tools GHub’s 

  81. C Exp

  82. Webk Dev Tls

  83. C Prir

  84. Time

  85. Auds

  86. Graphe

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

  88. cb (backd)

  89. whp (DB)

  90. T Graph S

  91. Graphs Evyw

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

  93. Simplifi C

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

  95. Refacr  use C

  96. Tmwk

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

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