Codegarden 2016

Codegarden 2016

Talk on web performance and Umbraco. Given at Codegarden 2016 in Odense, Denmark.

7b8d0adf6fd2decedeb551dc9dd027de?s=128

Matt Shull

June 15, 2016
Tweet

Transcript

  1. 4.

    Why Performance Matters First and foremost, we believe that speed

    is more than a feature. Speed is the most important feature. -Fred Wilson
  2. 7.
  3. 9.
  4. 11.

    80% decrease in" load time 80% increase in traffic 32%

    increase in median time spent on site
  5. 15.

    Time to First Byte TTFB measures the duration from the

    user or client making an HTTP request to the first byte of the page being received by the client's browser.
  6. 16.
  7. 17.
  8. 18.

    Time to First Byte •  Rendering of server side code

    – API calls – Slow SQL queries" •  Connection to the server – Memory leaks – Poor server resources
  9. 19.

    Speed Index Speed Index is the average time at which

    visible parts of the page are displayed. It is expressed in milliseconds and dependent on size of the view port.
  10. 20.

    Page Size Page size measures the number of kilobytes the

    site downloads to the user’s device.
  11. 23.

    Image File Types WebP •  Uses transparency •  Animation • 

    Photographs •  50%-75% smaller •  Android and Chrome
  12. 25.

    Responsive Images          <picture>      

               <source  srcset=“./large.webp”  type=“image/webp”  media=“(min-­‐width:  800px)”>                  <source  srcset=“./large.jpf”  type=“image/jpf”  media=“(min-­‐width:  800px)”>                  <source  srcset=“./large.jpg”  type=“image/jpg”  media=“(min-­‐width:  800px)”>                  <source  srcset=“./small.webp”  type=“image/webp”  media=“(max-­‐width:  799px)”>                  <source  srcset=“./small.jpf”  type=“image/jpf”  media=“(max-­‐width:  799px)”>                  <source  srcset=“./small.jpg”  type=“image/jpg”  media=“(max-­‐width:  799px)”>                  <img  srcset=“./large.jpg”  alt=“…”>          </picture>      
  13. 26.

    Responsive Background Images https://modernizr.com/          .webp  .container

     {    background-­‐image:  url(‘image.webp’);          }            .no-­‐webp  .container  {    background-­‐image:  url(‘image.jpeg’);          }    
  14. 28.

    CSS •  Minify files" •  Split into 3 files – Above

    the fold main page – Below the fold main page – Interior •  Use LoadCSS to load in below the fold css – Use <noscript> as a fallback
  15. 30.

    Fonts •  Reduce font weights" •  Strip out characters not

    needed using Font Squirrel" " •  Use browser font loading events" •  FOIT vs FOUT
  16. 32.

    Javascript •  Minify files •  Use HTML/CSS alternatives – Image rotators

    – Tabs – Responsive Navigation •  Split into mainpage.js and interior.js
  17. 36.

    Browser Hints: Prefetch Download and cache specific files once the

    browser is idle."   <link  rel=”prefetch"  href=”bO.min.css">    
  18. 37.

    Browser Hints: Prerender Download and cache an entire page."  

    <link  rel=“prerender”  href=“hPp://maPshull.com/umbraco”>    
  19. 39.

    Measuring Performance •  RUM – Real User Data – Measured using browser

    APIs •  Synthetic – Simulated User Testing – Simulated using real devices and browsers
  20. 42.
  21. 46.

    Creating a Culture of Performance •  Has to come from

    the top down – Show the impact performance has on business – Use video to show you vs competitor" •  Create a Performance Budget / Specification" •  Recognize developers and designers great work
  22. 47.

    Performance Budget •  HTML: 5% •  CSS: 10% •  Javascript:

    10% •  Images: 65% •  Fonts: 5% •  Other: 5%" •  Page Size Goal: 1500 kb (+/- 500 kb)
  23. 49.

    What’s Next? •  Javascript API for detecting connection speed" • 

    Measuring speed index in RUM" •  How does web performance impact conversions and user behavior?
  24. 50.

    We’re Just Scratching the Surface •  Designing for Performance by

    Lara Hogan" •  Follow Tammy Everts on Twitter and Blog" •  Follow Steve Souders Twitter and Blog" •  Follow me and @getswiftsage on Twitter" •  More resources at aristotlelabs.com/cg16