SlideShare una empresa de Scribd logo
1 de 42
Speed Matters
   Mark Stanton
    @MarkStanto
Does Speed Matter?
   •   2 sec delay reduces revenue by 4%

   •   1/2 sec drops traffic by 20%

   •   fastest 10% of users stay 50%
       longer than the slowest 10%

   •   10ms = one man-year per day
Terminology

•   Empty cache / Primed cache
•   Refresh / Revisit
•   Page ready / Page complete
•   Throughput / Latency
HTTP in 60 seconds
•   Initial Request
                      GET /assets/logo.png HTTP/1.1
                      Host: wds-demo.gruden.int
                      User-Agent: Mozilla/5.0...

                      HTTP/1.x 200 OK
                      Server: Apache/2.2.11...
                      Last-Modified: Wed, 09 Sep 2009 17:36:00 GMT
                      Content-Length: 4067
                      Content-Type: image/png



•   Subsequent Requests
                      GET /assets/logo.png HTTP/1.1
                      Host: wds-demo.gruden.int
                      User-Agent: Mozilla/5.0...
                      If-Modified-Since: Wed, 09 Sep 2009 17:36:00 GMT

                      HTTP/1.x 304 Not Modified
                      Server: Apache/1.3.41 ...
Case Study
IE6




      21.8s
Firefox3




      18.6s
Image Optimisation




                  755KB
                 Reduction!
Image Optimisation


24 bit PNG




                  512KB
                 Reduction!
Combine JS
•   Before:




•   After:



                           7 Fewer
                           Requests!
Combine CSS
•   Before:




•   After:



                            6 Fewer
                            Requests!
JS to Bottom




                Page Ready
               1 sec Faster!
Cache Control


•   ETags
•   Expires
Cache Control
•   Etag: "1c014-287d-f824c1c0"



•   If-None-Match: "1c014-287d-f824c1c0"



•   304 Not Modified
Cache Control


•   Expires: Wed, 08 Oct 2010 02:03:51 GMT
•   304 Not Modified
Cache Control
•   Before:
    <VirtualHost *:80>
           ServerName wds-demo.gruden.int
           DocumentRoot ...

           ErrorLog /private/var/log/apache2/wds-demo-error_log
           CustomLog /private/var/log/apache2/wds-demo-access_log common
    </VirtualHost>




•   After:
    <VirtualHost *:80>
           ServerName wds-demo.gruden.int
           DocumentRoot ...

           ErrorLog /private/var/log/apache2/wds-demo-error_log
           CustomLog /private/var/log/apache2/wds-demo-access_log common

           ExpiresActive on
           ExpiresDefault "access plus 1 year"

           FileETag none
    </VirtualHost>
                                                                           90% Fewer
                                                                             304s!
Cache Control

•   Cache-Control: "max-age=0, no-cache, no-
    store, must-revalidate"
•   Pragma: "no-cache"
•   Expires: "Wed, 11 Jan 1984 05:00:00 GMT"


                                           Doh!
Minify




           24KB
         Reduction!
Minify
GZip
•   Before:
    <VirtualHost *:80>
           ServerName wds-demo.gruden.int
           DocumentRoot ...

           ...

           ExpiresActive on
           ExpiresDefault "access plus 1 year"

           FileETag none
    </VirtualHost>


•   After:
    <VirtualHost *:80>
           ServerName wds-demo.gruden.int
           DocumentRoot ...

           AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript

           ...

           ExpiresActive on
           ExpiresDefault "access plus 1 year"                                 96KB
           FileETag none
    </VirtualHost>                                                           Reduction!
Split Components
 Across Domains




                  2.5 sec
               Faster in IE6!
Sprites
           139KB
          Reduction!




          35 Fewer
          Requests!
Restructure Content
Restructure Content


•   Logo into HTML
•   Lazy load rotators
Restructure Content




                  Page Ready
                 5 sec Faster!
CSS Selectors
•   Before:




•   After:



                             100 ms
                             Faster!
Huh?


100 ms
Faster!
Summary
•   Optimised Images         •   Minify

•   Combined JS              •   GZip

•   Combined CSS             •   Split Domains

•   JS to the Bottom         •   Sprites

•   Cache Control: Expires   •   Restructure Content
IE6 - Original




          21.8s
IE6 - Final




         6.0s
Firefox3 - Original




            18.6s
Firefox3 - Final




           4.1s
Tools
•   Firefox Plugins
    •   Firebug

    •   YSlow

    •   Page Speed

    •   Cache Status

    •   LiveHTTPHeaders

•   Charles Proxy
Tools

•   http://compressorrater.thruhere.net/
•   http://developer.yahoo.com/yslow/smushit/
•   http://spriteme.org/
•   http://spritegen.website-performance.org/
Tools

•   http://spritegen.website-performance.org/
•   http://spriteme.org/
•   http://developer.yahoo.com/yslow/smushit/
•   http://compressorrater.thruhere.net/
Hat Tip
•   http://stevesouders.com/
•   http://developer.yahoo.com/performance/
Conclusion


•   Look for low hanging fruit
•   Make incremental improvements
•   Incorporate into your process
Conclusion

•   Small upfront investment - continuous benefit
•   Reduced bandwidth
•   Reduced load times
•   Everyone lives happily ever after
Thanks


•   http://delicious.com/markstanton/speed-talk
•   @MarkStanto
Pop Quiz
Pop Quiz
Pop Quiz

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Highly available Drupal on a Raspberry Pi cluster
Highly available Drupal on a Raspberry Pi clusterHighly available Drupal on a Raspberry Pi cluster
Highly available Drupal on a Raspberry Pi cluster
 
Ui perf
Ui perfUi perf
Ui perf
 
Configuring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web PerormanceConfiguring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web Perormance
 
Reverse proxy & web cache with NGINX, HAProxy and Varnish
Reverse proxy & web cache with NGINX, HAProxy and VarnishReverse proxy & web cache with NGINX, HAProxy and Varnish
Reverse proxy & web cache with NGINX, HAProxy and Varnish
 
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
 
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a Proxy
 
NGINX High-performance Caching
NGINX High-performance CachingNGINX High-performance Caching
NGINX High-performance Caching
 
High Performance WordPress II
High Performance WordPress IIHigh Performance WordPress II
High Performance WordPress II
 
Mitigating Security Threats with Fastly - Joe Williams at Fastly Altitude 2015
Mitigating Security Threats with Fastly - Joe Williams at Fastly Altitude 2015Mitigating Security Threats with Fastly - Joe Williams at Fastly Altitude 2015
Mitigating Security Threats with Fastly - Joe Williams at Fastly Altitude 2015
 
Adobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - IntroductionAdobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - Introduction
 
DotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactDotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + react
 
SSDs are Awesome
SSDs are AwesomeSSDs are Awesome
SSDs are Awesome
 
Into The Box 2018 Ortus Keynote
Into The Box 2018 Ortus KeynoteInto The Box 2018 Ortus Keynote
Into The Box 2018 Ortus Keynote
 
Polyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQPolyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQ
 
CNPM: Private NPM for Company / 企業級私有NPM
CNPM: Private NPM for Company / 企業級私有NPMCNPM: Private NPM for Company / 企業級私有NPM
CNPM: Private NPM for Company / 企業級私有NPM
 
Building a better web
Building a better webBuilding a better web
Building a better web
 
PHP projects beyond the LAMP stack
PHP projects beyond the LAMP stackPHP projects beyond the LAMP stack
PHP projects beyond the LAMP stack
 
Scaling and Managing Selenium Grid
Scaling and Managing Selenium GridScaling and Managing Selenium Grid
Scaling and Managing Selenium Grid
 
Memcached: What is it and what does it do?
Memcached: What is it and what does it do?Memcached: What is it and what does it do?
Memcached: What is it and what does it do?
 

Similar a Speed Matters

High performance website
High performance websiteHigh performance website
High performance website
Chamnap Chhorn
 
Optimizing Your Frontend Performance
Optimizing Your Frontend PerformanceOptimizing Your Frontend Performance
Optimizing Your Frontend Performance
Thomas Weinert
 
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
camp_drupal_ua
 
Developer Tools And Page Speed
Developer  Tools And  Page  SpeedDeveloper  Tools And  Page  Speed
Developer Tools And Page Speed
Lina Shamiah
 
Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014
bryan_call
 

Similar a Speed Matters (20)

performance.ppt
performance.pptperformance.ppt
performance.ppt
 
Page Performance
Page PerformancePage Performance
Page Performance
 
Caching your rails application
Caching your rails applicationCaching your rails application
Caching your rails application
 
High performance website
High performance websiteHigh performance website
High performance website
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark Tomlinson
 
Optimizing Your Frontend Performance
Optimizing Your Frontend PerformanceOptimizing Your Frontend Performance
Optimizing Your Frontend Performance
 
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
 
Joomla Site Optimization
Joomla Site OptimizationJoomla Site Optimization
Joomla Site Optimization
 
Harder, Better, Faster, Stronger
Harder, Better, Faster, StrongerHarder, Better, Faster, Stronger
Harder, Better, Faster, Stronger
 
Developer Tools And Page Speed
Developer  Tools And  Page  SpeedDeveloper  Tools And  Page  Speed
Developer Tools And Page Speed
 
Don't make me wait! or Building High-Performance Web Applications
Don't make me wait! or Building High-Performance Web ApplicationsDon't make me wait! or Building High-Performance Web Applications
Don't make me wait! or Building High-Performance Web Applications
 
Apache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling OutApache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling Out
 
Going on an HTTP Diet: Front-End Web Performance
Going on an HTTP Diet: Front-End Web PerformanceGoing on an HTTP Diet: Front-End Web Performance
Going on an HTTP Diet: Front-End Web Performance
 
My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013
 
Building Faster Websites
Building Faster WebsitesBuilding Faster Websites
Building Faster Websites
 
Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014
 
Http2 in practice
Http2 in practiceHttp2 in practice
Http2 in practice
 
Webinar - DreamObjects/Ceph Case Study
Webinar - DreamObjects/Ceph Case StudyWebinar - DreamObjects/Ceph Case Study
Webinar - DreamObjects/Ceph Case Study
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
 
Silverlight Wireshark Analysis
Silverlight Wireshark AnalysisSilverlight Wireshark Analysis
Silverlight Wireshark Analysis
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Speed Matters

  • 1. Speed Matters Mark Stanton @MarkStanto
  • 2. Does Speed Matter? • 2 sec delay reduces revenue by 4% • 1/2 sec drops traffic by 20% • fastest 10% of users stay 50% longer than the slowest 10% • 10ms = one man-year per day
  • 3. Terminology • Empty cache / Primed cache • Refresh / Revisit • Page ready / Page complete • Throughput / Latency
  • 4. HTTP in 60 seconds • Initial Request GET /assets/logo.png HTTP/1.1 Host: wds-demo.gruden.int User-Agent: Mozilla/5.0... HTTP/1.x 200 OK Server: Apache/2.2.11... Last-Modified: Wed, 09 Sep 2009 17:36:00 GMT Content-Length: 4067 Content-Type: image/png • Subsequent Requests GET /assets/logo.png HTTP/1.1 Host: wds-demo.gruden.int User-Agent: Mozilla/5.0... If-Modified-Since: Wed, 09 Sep 2009 17:36:00 GMT HTTP/1.x 304 Not Modified Server: Apache/1.3.41 ...
  • 6. IE6 21.8s
  • 7. Firefox3 18.6s
  • 8. Image Optimisation 755KB Reduction!
  • 9. Image Optimisation 24 bit PNG 512KB Reduction!
  • 10. Combine JS • Before: • After: 7 Fewer Requests!
  • 11. Combine CSS • Before: • After: 6 Fewer Requests!
  • 12. JS to Bottom Page Ready 1 sec Faster!
  • 13. Cache Control • ETags • Expires
  • 14. Cache Control • Etag: "1c014-287d-f824c1c0" • If-None-Match: "1c014-287d-f824c1c0" • 304 Not Modified
  • 15. Cache Control • Expires: Wed, 08 Oct 2010 02:03:51 GMT • 304 Not Modified
  • 16. Cache Control • Before: <VirtualHost *:80> ServerName wds-demo.gruden.int DocumentRoot ... ErrorLog /private/var/log/apache2/wds-demo-error_log CustomLog /private/var/log/apache2/wds-demo-access_log common </VirtualHost> • After: <VirtualHost *:80> ServerName wds-demo.gruden.int DocumentRoot ... ErrorLog /private/var/log/apache2/wds-demo-error_log CustomLog /private/var/log/apache2/wds-demo-access_log common ExpiresActive on ExpiresDefault "access plus 1 year" FileETag none </VirtualHost> 90% Fewer 304s!
  • 17. Cache Control • Cache-Control: "max-age=0, no-cache, no- store, must-revalidate" • Pragma: "no-cache" • Expires: "Wed, 11 Jan 1984 05:00:00 GMT" Doh!
  • 18. Minify 24KB Reduction!
  • 20. GZip • Before: <VirtualHost *:80> ServerName wds-demo.gruden.int DocumentRoot ... ... ExpiresActive on ExpiresDefault "access plus 1 year" FileETag none </VirtualHost> • After: <VirtualHost *:80> ServerName wds-demo.gruden.int DocumentRoot ... AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript ... ExpiresActive on ExpiresDefault "access plus 1 year" 96KB FileETag none </VirtualHost> Reduction!
  • 21. Split Components Across Domains 2.5 sec Faster in IE6!
  • 22. Sprites 139KB Reduction! 35 Fewer Requests!
  • 24. Restructure Content • Logo into HTML • Lazy load rotators
  • 25. Restructure Content Page Ready 5 sec Faster!
  • 26. CSS Selectors • Before: • After: 100 ms Faster!
  • 28. Summary • Optimised Images • Minify • Combined JS • GZip • Combined CSS • Split Domains • JS to the Bottom • Sprites • Cache Control: Expires • Restructure Content
  • 29. IE6 - Original 21.8s
  • 30. IE6 - Final 6.0s
  • 33. Tools • Firefox Plugins • Firebug • YSlow • Page Speed • Cache Status • LiveHTTPHeaders • Charles Proxy
  • 34. Tools • http://compressorrater.thruhere.net/ • http://developer.yahoo.com/yslow/smushit/ • http://spriteme.org/ • http://spritegen.website-performance.org/
  • 35. Tools • http://spritegen.website-performance.org/ • http://spriteme.org/ • http://developer.yahoo.com/yslow/smushit/ • http://compressorrater.thruhere.net/
  • 36. Hat Tip • http://stevesouders.com/ • http://developer.yahoo.com/performance/
  • 37. Conclusion • Look for low hanging fruit • Make incremental improvements • Incorporate into your process
  • 38. Conclusion • Small upfront investment - continuous benefit • Reduced bandwidth • Reduced load times • Everyone lives happily ever after
  • 39. Thanks • http://delicious.com/markstanton/speed-talk • @MarkStanto