Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Data Driven Performance Optimisation

Data Driven Performance Optimisation

Which key metrics should we choose to get an idea on our site's performance?

Stefan Baumgartner

June 10, 2015
Tweet

More Decks by Stefan Baumgartner

Other Decks in Technology

Transcript

  1. 2011 2015 4 times a week in the fitness studio

    0, nada, niente, null, void, undefined able to run 10 kilometers able to get to the supermarket across the corner 20% body fat this is getting too intimate (and embarrassing) 74kg
  2. Images 1.310 Other 4 Video 227 HTML 56 Fonts 97

    Scripts 329 Stylesheets 63 http://httparchive.org/interesting.php Total: 2099 kB
  3. Users expect fast sites. After 3 seconds of load time,

    40% will abandon your site https://speakerdeck.com/lara/designing-for-performance
  4. Etsy found out that: + 160kb on a page +

    12% bounce rate https://speakerdeck.com/lara/designing-for-performance
  5. Also: - 1 redirect on a page + 12% click-through

    rate https://speakerdeck.com/lara/designing-for-performance
  6. “Weight” is an easy one: The bigger your site is,

    the more it has to transfer over the wire.
  7. This menu at the top holds 94 product images The

    requests alone stall the browser for roughly 14 sec
  8. But it just has to be available when JavaScript is

    on … so we load it asynchronously in our JavaScript at the bottom. This reduces time to glass to 1.3s
  9. “Page Speed Score” tells you if you’ve followed a series

    of best practices for every component of your website
  10. The 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.
  11. Visually complete (%) 0 25 50 75 100 Time in

    Seconds 0s 1s 2s 3s 4s 5s 6s 7s 8s
  12. Visually complete (%) 0 25 50 75 100 Time in

    Seconds 0s 1s 2s 3s 4s 5s 6s 7s 8s
  13. Visually complete (%) 0 25 50 75 100 Time in

    Seconds 0s 1s 2s 3s 4s 5s 6s 7s 8s
  14. Every page is fully loaded in 10 seconds 93% linear

    after 1 second 100% linear after 10 seconds 20% linear after 9 seconds 7% linear after 9 seconds 80% linear after 1 second 881 5000 8610
  15. This is where the content is loaded So let’s show

    the user everything we’ve got so far
  16. On loading a new page… why should we (even if

    it’s cached) check everything again and again?
  17. Just load the things we need and tell the browser

    where we are without loading all the burden
  18. var updateContent = function(data, url) { var mkup = $(data);

    url = url.toString(); history.pushState({ url: url, title: title }, mkup.filter('title'), url); $('#content').html(mkup.filter('#content').html()) .remove(); $('title').text(title); };
  19. var updateContent = function(data, url) { var mkup = $(data);

    url = url.toString(); history.pushState({ url: url, title: title }, mkup.filter('title'), url); $('#content').html(mkup.filter('#content').html()) .remove(); $(‘title').text(title); sessionStorage.setItem(url, data); };