Respond Promptly
Motivation
Good service includes responding promptly—whether
  that’s you or your web server.
  -Jehochman
Faster responses generate more revenue.
  “Most e-commerce sites rank among the slowest sites
  on the Internet. Amazon did a study where they
  identified that there is a direct relationship between
  page load speed and conversion rates. They found a 1
  percent decrease in sales for every 0.1 second
  decrease in response times. Other studies have
  identified speed as the single most critical factor for e-
  commerce conversion.” (emphasis added)
  -Steve Francia, Internet Evolution
http://tools.pingdom.com/fpt/

        3
Speed Benchmarks
•   1.5 seconds (1500 milliseconds) is acceptable
•   Google.com loads in 300 - 500 ms.
•   I prefer 1 second or faster.
•   Test a few times and discard any outliers.
The speed of light: c = 186 282 mi/sec
  Information never moves faster.




  Albert Michelson        Edward Morley            Albert Einstein




             Distance from Earth to Moon is 238 855 miles
SearchEngineLand.com
Distance to User Impacts Response Time


Dallas



Holland


10 000 mi / c x 272 = 14.78 sec
10 000 mi / c x 275 req / 3.5 parallel req = 4.21 sec
Content Delivery Networks (CDN)
• First load might be slow (with free service)
• Caching speeds up subsequent loads

Naked
Server




CDN
Deployed
Hosting Matters

Linux hosting at
BostonComputing.net:
1 second




Unnamed Windows
hosting – same site:
12 seconds
Complain to the Hosting Provider

Before




After
Does HTML Efficiency Matter?
• A lot of people obsess about code size.
• Is it worth the effort to recode for speed?
  - probably not!
Ctrl-U: View Source—3052 lines!
6X Less Code—But Same Load Time.
HTML Size Matters, but Not So Much.
Content Management Systems (CMS)
            and Caching
• It takes time to run PHP/Ruby/Java scripts
  server side. A CMS is slower than static code.
• A cache stores the script output and reuses it
  each time the page is requested.
• Caching cuts response times, but some types
  of updates might not appear instantly.
• W3 Total Cache for Wordpress
  http://yoast.com/w3-total-cache/
Cache Off / On Test




W3 Total Cache also does minification: CSS and JS files are merged, and
extraneous characters are stripped from files.
Web Video and Speed
• Asynchronous video (and AJAX) impacts page
  load speed very little.
• Streaming large video files from the same
  server probably isn’t smart.
• Wistia is a good option.
Speed Tactics are
Cumulative
The Easiest Speed Wins
• Good Hosting
      Not overloaded, properly configured server
• Content Delivery Network
      Place static files close to the visitors
• Simplify Design to Improve Usability and Speed
      26 requests are ~10X faster than 275 requests
• Cache Plugin for CMS
      Alleviates time spent running server-side scripts.
• Appropriate Use of Asynchronous Content
      Leverage AJAX and Video for complex content
Google PageSpeed™
developers.google.com/speed/pagespeed/
• PageSpeed extension for Chrome and Firefox
• mod_pagespeed – an open source Apache module
  that speeds up serving.
• Lots of details for those with time and expertise. For
  people who run their own servers.
• Recommendations are automated and NOT based on
  actual speed. They are a start, not an end.
  developers.google.com/speed/pagespeed/insights
Further Reading
https://developers.google.com/speed/docs/best-
   practices/rules_intro

• Optimizing caching — keeping your application's data and
  logic off the network altogether
• Minimizing round-trip times — reducing the number of serial
  request-response cycles
• Minimizing request overhead — reducing upload size
• Minimizing payload size — reducing the size of responses,
  downloads, and cached pages
• Optimizing browser rendering — improving the browser's
  layout of a page
• Optimizing for mobile — tuning a site for the characteristics of
  mobile networks and mobile devices
Jonathan Hochman
 slideshare.net/jehochman
linkedin.com/in/jehochman
  hochmanconsultants.com
        @Jehochman

Breaking the Speed Limit: Faster Websites Win

  • 1.
  • 2.
    Motivation Good service includesresponding promptly—whether that’s you or your web server. -Jehochman Faster responses generate more revenue. “Most e-commerce sites rank among the slowest sites on the Internet. Amazon did a study where they identified that there is a direct relationship between page load speed and conversion rates. They found a 1 percent decrease in sales for every 0.1 second decrease in response times. Other studies have identified speed as the single most critical factor for e- commerce conversion.” (emphasis added) -Steve Francia, Internet Evolution
  • 3.
  • 4.
    Speed Benchmarks • 1.5 seconds (1500 milliseconds) is acceptable • Google.com loads in 300 - 500 ms. • I prefer 1 second or faster. • Test a few times and discard any outliers.
  • 5.
    The speed oflight: c = 186 282 mi/sec Information never moves faster. Albert Michelson Edward Morley Albert Einstein Distance from Earth to Moon is 238 855 miles
  • 7.
  • 8.
    Distance to UserImpacts Response Time Dallas Holland 10 000 mi / c x 272 = 14.78 sec 10 000 mi / c x 275 req / 3.5 parallel req = 4.21 sec
  • 9.
    Content Delivery Networks(CDN) • First load might be slow (with free service) • Caching speeds up subsequent loads Naked Server CDN Deployed
  • 11.
    Hosting Matters Linux hostingat BostonComputing.net: 1 second Unnamed Windows hosting – same site: 12 seconds
  • 12.
    Complain to theHosting Provider Before After
  • 13.
    Does HTML EfficiencyMatter? • A lot of people obsess about code size. • Is it worth the effort to recode for speed? - probably not!
  • 15.
  • 17.
    6X Less Code—ButSame Load Time. HTML Size Matters, but Not So Much.
  • 18.
    Content Management Systems(CMS) and Caching • It takes time to run PHP/Ruby/Java scripts server side. A CMS is slower than static code. • A cache stores the script output and reuses it each time the page is requested. • Caching cuts response times, but some types of updates might not appear instantly. • W3 Total Cache for Wordpress http://yoast.com/w3-total-cache/
  • 19.
    Cache Off /On Test W3 Total Cache also does minification: CSS and JS files are merged, and extraneous characters are stripped from files.
  • 20.
    Web Video andSpeed • Asynchronous video (and AJAX) impacts page load speed very little. • Streaming large video files from the same server probably isn’t smart. • Wistia is a good option.
  • 21.
  • 22.
    The Easiest SpeedWins • Good Hosting Not overloaded, properly configured server • Content Delivery Network Place static files close to the visitors • Simplify Design to Improve Usability and Speed 26 requests are ~10X faster than 275 requests • Cache Plugin for CMS Alleviates time spent running server-side scripts. • Appropriate Use of Asynchronous Content Leverage AJAX and Video for complex content
  • 23.
    Google PageSpeed™ developers.google.com/speed/pagespeed/ • PageSpeedextension for Chrome and Firefox • mod_pagespeed – an open source Apache module that speeds up serving. • Lots of details for those with time and expertise. For people who run their own servers. • Recommendations are automated and NOT based on actual speed. They are a start, not an end. developers.google.com/speed/pagespeed/insights
  • 24.
    Further Reading https://developers.google.com/speed/docs/best- practices/rules_intro • Optimizing caching — keeping your application's data and logic off the network altogether • Minimizing round-trip times — reducing the number of serial request-response cycles • Minimizing request overhead — reducing upload size • Minimizing payload size — reducing the size of responses, downloads, and cached pages • Optimizing browser rendering — improving the browser's layout of a page • Optimizing for mobile — tuning a site for the characteristics of mobile networks and mobile devices
  • 25.