Once More, With Feeling at Code 2016 in Sydney

Once More, With Feeling at Code 2016 in Sydney

As an industry, we’re starting to recognize that what really matters for performance is how fast the experience feels. While this seems like a relatively minor revelation, in reality it requires a significant shift in the way we approach speed online: everything from the way we measure to the optimizations we use. Let’s look at how to reframe performance on the web, and what techniques and technologies are out there to help us create experiences that feel fast and frictionless.

Presented at Code 2016 in Syndey, Australia on July 28, 2016.

A9a379f2e92c7ded4564190c5b286b78?s=128

Tim Kadlec

July 28, 2016
Tweet

Transcript

  1. ONCE MORE, WITH FEELING https://flic.kr/p/cxeNPs Tim Kadlec | @tkadlec |

    #code16
  2. None
  3. None
  4. None
  5. None
  6. PERCEPTION IS REALITY

  7. PERCEPTION FRAMES REALITY

  8. None
  9. A B

  10. None
  11. http://livingwithlag.com/

  12. 100ms 1% REVENUE

  13. 100ms 1000ms Feels instantaneous & maintains a connection between action

    & reaction. Anything longer and the user loses focus on their task.
  14. None
  15. DNS Lookup TCP Connection SSL Negotiation Request

  16. DNS Lookup 100ms TCP Connection 100ms SSL Negotiation 100-200ms Request

    100ms
  17. DNS Lookup 100ms TCP Connection 100ms SSL Negotiation 100-200ms Request

    100ms 400-500ms
  18. “THE FASTEST REQUEST IS NO REQUEST” —EVERY PERFORMANCE ADVOCATE EVER

  19. EVERYTHING SHOULD HAVE VALUE, BECAUSE EVERYTHING HAS A COST

  20. HOW DO WE BALANCE RICHNESS WITH SPEED

  21. “PERFORMANCE IS THE DEVELOPER’S RESPONSIBILITY”

  22. None
  23. None
  24. PERFORMANCE IS ABOUT THE USER

  25. None
  26. PASSIVE ACTIVE VS

  27. PASSIVE

  28. PASSIVE WAITING OVERESTIMATED BY 36%

  29. None
  30. None
  31. DNS Lookup TCP Connection SSL Negotiation Request

  32. header('Link: <path/to/critical.css>; rel=preload; as=stylesheet');

  33. <link rel="preload" href=“/path/to/styles.css”>

  34. function preload(url) { var hint = document.createElement("link"); hint.rel = "preload";

    hint.href = url; document.head.appendChild(hint); }
  35. <link rel="dns-prefetch" href="// host_name_to_prefetch.com">

  36. DNS Lookup TCP Connection SSL Negotiation Request

  37. <link rel="preconnect" href="// host_name_to_prefetch.com">

  38. DNS Lookup TCP Connection SSL Negotiation Request

  39. <link rel="dns-prefetch" href=“// host_name_to_prefetch.com"> <link rel="preconnect" href="// host_name_to_prefetch.com">

  40. <link rel="preload" href="/style/other.css" as="style">

  41. DNS Lookup TCP Connection SSL Negotiation Request

  42. <link rel="prefetch" href="/style/other.css" as="style">

  43. DNS Lookup TCP Connection SSL Negotiation Request

  44. <link rel="prerender" href="//example.com/next- page.html">

  45. DNS Lookup TCP Connection SSL Negotiation Request

  46. None
  47. Network

  48. HTML Network CSS Javascript

  49. HTML Network CSS Javascript DOM CSSOM

  50. HTML Network CSS Javascript DOM CSSOM

  51. document.write(“No sleep til’ Brooklyn.”); document.getElementById(‘#main').style.height = "100px";

  52. HTML Network CSS Javascript DOM CSSOM Render Tree

  53. HTML Network CSS Javascript DOM CSSOM Render Tree Layout

  54. HTML Network CSS Javascript DOM CSSOM Render Tree Layout Paint

  55. CRITICAL PATH

  56. ANYTHING IN THE WAY OF INITIAL RENDER IS CRITICAL

  57. <html> <head> <meta charset="UTF-8"> <title>Hey there</title> <link rel="stylesheet" href="style.css" />

    <script type=“text/javascript” src=“jquereactugular.js“> </script> </head> <body> <h1>Super awesome site</h1> <div id=“main"> <p>Super interesting stuff, I'm sure.</p> </div> </body> </html> 1
  58. <html> <head> <meta charset="UTF-8"> <title>Hey there</title> <link rel="stylesheet" href="style.css" />

    <script type=“text/javascript” src=“jquereactugular.js“> </script> </head> <body> <h1>Super awesome site</h1> <div id=“main"> <p>Super interesting stuff, I'm sure.</p> </div> </body> </html> 2
  59. <html> <head> <meta charset="UTF-8"> <title>Hey there</title> <link rel="stylesheet" href="style.css" />

    <script type=“text/javascript” src=“jquereactugular.js“> </script> </head> <body> <h1>Super awesome site</h1> <div id=“main"> <p>Super interesting stuff, I'm sure.</p> </div> </body> </html> 3
  60. <script type=“text/javascript” src=“jquereactugular.js“> </script>

  61. <script>

  62. <script>

  63. <script>

  64. <script type="text/javascript" async src="blah.js.php"></script>

  65. <script async>

  66. <script async>

  67. <script async>

  68. <script type="text/javascript" defer src="blah.js.php"></script>

  69. <script defer>

  70. <script defer>

  71. <html> <head> <meta charset="UTF-8"> <title>Hey there</title> <link rel="stylesheet" href="style.css" />

    <script type=“text/javascript” async src=“jquereactugular.js“ ></script> </head> <body> <h1>Super awesome site</h1> <div id=“main"> <p>Super interesting stuff, I'm sure.</p> </div> </body> </html>
  72. <html> <head> <meta charset="UTF-8"> <title>Hey there</title> <link rel="stylesheet" href="style.css" />

    <script type=“text/javascript” async src=“jquereactugular.js“ ></script> </head> <body> <h1>Super awesome site</h1> <div id=“main"> <p>Super interesting stuff, I'm sure.</p> </div> </body> </html>
  73. .event-name .tagline .event-year

  74. <link rel="stylesheet" href="style.css" />

  75. <style type=“text/css”> //critical css inlined and minimized </style> <script type=“text/javascript”

    > loadCSS(‘/path/to/full/css’); //set a cookie </script>
  76. <html> <head> <meta charset="UTF-8"> <title>Hey there</title> <style type=“text/css”> //critical css

    inlined and minimized </style> <script type=“text/javascript” async src=“jquereactugular.js“ ></script> </head> <body> <h1>Super awesome site</h1> <div id=“main"> <p>Super interesting stuff, I'm sure.</p> </div> </body> </html>
  77. http://bit.ly/1Jw2jj7

  78. None
  79. PROGRESS BARS ARE THE HOLD MUSIC OF THE INTERNET

  80. None
  81. PROGRESS BARS FOCUS ON THE WAITING

  82. http://www.lukew.com/ff/entry.asp?1797

  83. http://www.lukew.com/ff/entry.asp?1797

  84. http://www.lukew.com/ff/entry.asp?1797

  85. SKELETON SCREENS FOCUS ON THE PROGRESS

  86. FOCUS ON WHAT YOU DON’T HAVE

  87. FOCUS ON WHAT YOU’RE GOING TO GET

  88. DIV DIV DIV

  89. None
  90. None
  91. FEEDBACK SHOWS PROGRESS

  92. FEEDBACK EASES ANXIETY

  93. None
  94. None
  95. OPERATIONAL TRANSPARENCY

  96. None
  97. https://flic.kr/p/7WcQwA CHOREOGRAPHY

  98. PERFORMANCE IS ABOUT THE USER

  99. PERCEPTION FRAMES REALITY

  100. https://flic.kr/p/7WcQwA USER-CENTRIC PERFORMACE

  101. THANK YOU https://flic.kr/p/cxeNPs Tim Kadlec | @tkadlec | #code16