SlideShare a Scribd company logo
1 of 126
Web Sites on Speed
About me
About me
• Tom Hughes-Croucher
About me
• Tom Hughes-Croucher
• @sh1mmer
About me
• Tom Hughes-Croucher
• @sh1mmer
• Yahoo! Technical Evangelist
About me
• Tom Hughes-Croucher
• @sh1mmer
• Yahoo! Technical Evangelist
 • Evangelism = stuff I believe in
About me
• Tom Hughes-Croucher
• @sh1mmer
• Yahoo! Technical Evangelist
 • Evangelism = stuff I believe in
• Wrote Web Standards (W3C, BSI, etc)
About me
• Tom Hughes-Croucher
• @sh1mmer
• Yahoo! Technical Evangelist
 • Evangelism = stuff I believe in
• Wrote Web Standards (W3C, BSI, etc)
• Currently doing performance research
Overview
Overview

• What makes a web site slow?
Overview

• What makes a web site slow?
• What can we do to make it faster?
Overview

• What makes a web site slow?
• What can we do to make it faster?
• What tools can help?
Why are web
                               sites slow?




http://www.flickr.com/photos/topaz-mcnumpty/3544574591/sizes/l/
What is a website
   made of?
What is a website
       made of?
• Content (HTML)
What is a website
       made of?
• Content (HTML)
• Images / Flash
What is a website
       made of?
• Content (HTML)
• Images / Flash
• Styles (CSS)
What is a website
        made of?
• Content (HTML)
• Images / Flash
• Styles (CSS)
• Interaction (JavaScript)
What is a website
        made of?
• Content (HTML)
• Images / Flash
• Styles (CSS)
• Interaction (JavaScript)
• Server farm
What is a website
       made of?
• Content (HTML)
• Images / Flash
• Styles (CSS)
• Interaction (JavaScript)
• Server farm
• Maybe a database, Web services, CDN
PHP is only a part
 9%     91%
Where does the
  time go?
Where does the
       time go?
• DNS lookups & HTTP requests
Where does the
       time go?
• DNS lookups & HTTP requests
• Building pages
Where does the
       time go?
• DNS lookups & HTTP requests
• Building pages
• Downloading stuff
Where does the
       time go?
• DNS lookups & HTTP requests
• Building pages
• Downloading stuff
• Rendering stuff
Where does the
       time go?
• DNS lookups & HTTP requests
• Building pages
• Downloading stuff
• Rendering stuff
• User Interaction
It’s about perception!
How do we speed it up?
How do we speed it up?
•   DNS lookups & HTTP
    requests
How do we speed it up?
•   DNS lookups & HTTP   ➡ Reduce lookups and
    requests               connections
How do we speed it up?
•   DNS lookups & HTTP   ➡ Reduce lookups and
    requests               connections

•   Building pages
How do we speed it up?
•   DNS lookups & HTTP   ➡ Reduce lookups and
    requests               connections

•   Building pages       ➡ Return content as fast
                           as possible
How do we speed it up?
•   DNS lookups & HTTP   ➡ Reduce lookups and
    requests               connections

•   Building pages       ➡ Return content as fast
                           as possible

•   Downloading stuff
How do we speed it up?
•   DNS lookups & HTTP   ➡ Reduce lookups and
    requests               connections

•   Building pages       ➡ Return content as fast
                           as possible

•   Downloading stuff    ➡ Reduce the size of
                           content
How do we speed it up?
•   DNS lookups & HTTP   ➡ Reduce lookups and
    requests               connections

•   Building pages       ➡ Return content as fast
                           as possible

•   Downloading stuff    ➡ Reduce the size of
                           content

•   Rendering stuff
How do we speed it up?
•   DNS lookups & HTTP   ➡ Reduce lookups and
    requests               connections

•   Building pages       ➡ Return content as fast
                           as possible

•   Downloading stuff    ➡ Reduce the size of
                           content

•   Rendering stuff      ➡ Structure pages for
                           performance
How do we speed it up?
•   DNS lookups & HTTP   ➡ Reduce lookups and
    requests               connections

•   Building pages       ➡ Return content as fast
                           as possible

•   Downloading stuff    ➡ Reduce the size of
                           content

•   Rendering stuff      ➡ Structure pages for
                           performance

•   User Interaction
How do we speed it up?
•   DNS lookups & HTTP   ➡ Reduce lookups and
    requests               connections

•   Building pages       ➡ Return content as fast
                           as possible

•   Downloading stuff    ➡ Reduce the size of
                           content

•   Rendering stuff      ➡ Structure pages for
                           performance

•   User Interaction     ➡ Cheat
Fixing stuff


http://www.flickr.com/photos/sharynmorrow/29351619/
1. Reduce DNS
Lookups & connections
1. Reduce DNS
Lookups & connections
• Reduce the number of domains (2-4)
1. Reduce DNS
Lookups & connections
• Reduce the number of domains (2-4)
• Avoid redirects
1. Reduce DNS
Lookups & connections
• Reduce the number of domains (2-4)
• Avoid redirects
 • 301, 302, location.href=...
1. Reduce DNS
Lookups & connections
• Reduce the number of domains (2-4)
• Avoid redirects
 • 301, 302, location.href=...
• Combine CSS and Javascript files into a
  single file for each type
Simple Combo Handler
$combo = preg_replace('/^.*?/', '',
$_SERVER['REQUEST_URI']);

$sources = split('&', $combo);

header('Content-type: text/javascript');

foreach($sources as $source) {
   // TODO: Verify that $source is safe and exists
   include("/var/www/$source");
}
1. Reduce DNS
Lookups & connections
1. Reduce DNS
Lookups & connections
• Reduce the number of domains (2-4)
• Avoid redirects
 • 301, 302, location.href=...
• Combine CSS and Javascript files into a
  single file for each type
1. Reduce DNS
Lookups & connections
• Reduce the number of domains (2-4)
• Avoid redirects
 • 301, 302, location.href=...
• Combine CSS and Javascript files into a
  single file for each type
• Combine decorative images into sprites
30px




30px

       0px
1. Reduce DNS
Lookups & connections
1. Reduce DNS
Lookups & connections
• Reduce the number of domains (2-4)
• Avoid redirects
  • 301, 302, location.href=...
• Combine CSS and Javascript files into a
  single file for each type
• Combine decorative images into sprites
1. Reduce DNS
Lookups & connections
• Reduce the number of domains (2-4)
• Avoid redirects
  • 301, 302, location.href=...
• Combine CSS and Javascript files into a
  single file for each type
• Combine decorative images into sprites
• Cache aggressively
1. Reduce DNS
 Lookups & connections

<Location /static>
   ExpiresActive On
   ExpiresDefault     "access plus 1 year"
</Location>
2. Return Quickly
2. Return Quickly


• Get the first chunk of bytes out as soon as
  possible
2. Return Quickly


• Get the first chunk of bytes out as soon as
  possible
• Flush often
2. Return Quickly
2. Return Quickly
• Get the first chunk of bytes out as soon as
  possible
• Flush often
2. Return Quickly
• Get the first chunk of bytes out as soon as
  possible
• Flush often
• Don't bother your server with static
  content
2. Return Quickly
• Get the first chunk of bytes out as soon as
  possible
• Flush often
• Don't bother your server with static
  content
• Cache expensive back end calls, and use a
  front-end cache
2. Return Quickly
Cache expensive back end calls, and use a front-end cache
2. Return Quickly
2. Return Quickly
• Get the first chunk of bytes out as soon as
  possible
• Flush often
• Don't bother your server with static content
• Cache expensive back end calls, and use a
  front-end cache
2. Return Quickly
• Get the first chunk of bytes out as soon as
  possible
• Flush often
• Don't bother your server with static content
• Cache expensive back end calls, and use a
  front-end cache
• Reduce MaxClients in apache
3. Slim down
3. Slim down
•   gzip content over the wire
3. Slim down
•   gzip content over the wire
•   Minify CSS and Javascript (use YUI
    Compressor) & Optimise images (use smush.it)
3. Slim down
•   gzip content over the wire
•   Minify CSS and Javascript (use YUI
    Compressor) & Optimise images (use smush.it)
•   Avoid duplicate CSS and Javascript files
3. Slim down
•   gzip content over the wire
•   Minify CSS and Javascript (use YUI
    Compressor) & Optimise images (use smush.it)
•   Avoid duplicate CSS and Javascript files
•   Reduce cookie size
3. Slim down
•   gzip content over the wire
•   Minify CSS and Javascript (use YUI
    Compressor) & Optimise images (use smush.it)
•   Avoid duplicate CSS and Javascript files
•   Reduce cookie size
•   Use a CDN
3. Slim down
•   gzip content over the wire
•   Minify CSS and Javascript (use YUI
    Compressor) & Optimise images (use smush.it)
•   Avoid duplicate CSS and Javascript files
•   Reduce cookie size
•   Use a CDN
•   Post-load components
4. Restructure pages
4. Restructure pages
• Put CSS at the top to avoid having to
  redraw the page later
4. Restructure pages
• Put CSS at the top to avoid having to
  redraw the page later
• Put Javascript at the bottom so that it
  doesn't block rendering
4. Restructure pages
• Put CSS at the top to avoid having to
  redraw the page later
• Put Javascript at the bottom so that it
  doesn't block rendering
• Avoid tables for layout
4. Restructure pages
• Put CSS at the top to avoid having to
  redraw the page later
• Put Javascript at the bottom so that it
  doesn't block rendering
• Avoid tables for layout
• Delay loading of invisible content
4. Restructure pages
• Put CSS at the top to avoid having to
  redraw the page later
• Put Javascript at the bottom so that it
  doesn't block rendering
• Avoid tables for layout
• Delay loading of invisible content
• Reduce the number of HTML elements
5. Cheat the DOM
5. Cheat the DOM
•   Attach events on a container rather than on
    each element
5. Cheat the DOM
•   Attach events on a container rather than on
    each element
•   Delay event attachment
5. Cheat the DOM
•   Attach events on a container rather than on
    each element
•   Delay event attachment
•   Cache DOM elements and work on invisible
    elements
5. Cheat the DOM
•   Attach events on a container rather than on
    each element
•   Delay event attachment
•   Cache DOM elements and work on invisible
    elements
•   Reduce iterations on DOM elements
5. Cheat the DOM
•   Attach events on a container rather than on
    each element
•   Delay event attachment
•   Cache DOM elements and work on invisible
    elements
•   Reduce iterations on DOM elements
•   Use more specific, semantically correct HTML
    tags
Use the right tags

<div>
   <div>
       <input class="entry" name="larry">
       <input class="entry" name="curly">
   </div>
   <div>
       <input class="entry" name="moe">
   </div>
</div>
Use the right tags

<ul>
   <li>
      <input class="entry" name="larry">
      <input class="entry" name="curly">
   </li>
   <li>
      <input class="entry" name="moe">
   </li>
</ul>
5. Cheat the DOM
5. Cheat the DOM
•   Attach events on a container rather than on each
    element
•   Delay event attachment
•   Cache DOM elements and work on invisible elements
•   Reduce iterations on DOM elements
•   Use more specific, semantically correct HTML tags
5. Cheat the DOM
•   Attach events on a container rather than on each
    element
•   Delay event attachment
•   Cache DOM elements and work on invisible elements
•   Reduce iterations on DOM elements
•   Use more specific, semantically correct HTML tags
•   Use local copies of global variables
5. Cheat the DOM
•   Attach events on a container rather than on each
    element
•   Delay event attachment
•   Cache DOM elements and work on invisible elements
•   Reduce iterations on DOM elements
•   Use more specific, semantically correct HTML tags
•   Use local copies of global variables
•   Profile your Javascript (use YUI Profiler)
More tips
More tips


• Preload expected content
More tips
More tips


• Preload expected content
More tips


• Preload expected content
• Progressively enhance your pages
It’s about perception!
More tips
More tips

• Preload expected content
• Progressively enhance your pages
More tips

• Preload expected content
• Progressively enhance your pages
• Use <link> instead of @import and avoid
  CSS expressions
More tips

• Preload expected content
• Progressively enhance your pages
• Use <link> instead of @import and avoid
  CSS expressions
• Avoid 404s and reduce IFRAMEs
More tips
More tips
• Preload expected content
• Progressively enhance your pages
• Use <link> instead of @import and avoid
  CSS expressions
• Avoid 404s and reduce IFRAMEs
More tips
• Preload expected content
• Progressively enhance your pages
• Use <link> instead of @import and avoid
  CSS expressions
• Avoid 404s and reduce IFRAMEs
• Turn off .htaccess
YSlow
YSlow
• Firebug plugin to analyse pages for
  performance gotchas
YSlow
• Firebug plugin to analyse pages for
  performance gotchas
• http://developer.yahoo.com/yslow/
YSlow
• Firebug plugin to analyse pages for
  performance gotchas
• http://developer.yahoo.com/yslow/
• Follow YSlow's advice to improve page
  performance
YSlow
• Firebug plugin to analyse pages for
  performance gotchas
• http://developer.yahoo.com/yslow/
• Follow YSlow's advice to improve page
  performance
• Try Sergey Chernyshev's ShowSlow to
  automate YSlow usage
Tools


http://www.flickr.com/photos/bre/552152780/sizes/l/
Tools
•   YSlow: developer.yahoo.com/yslow/
•   SmushIt: smushit.com
•   CSS Sprites: pt.spritegen.website-performance.org
•   YUI Profiler: developer.yahoo.com/yui/profiler/
•   ShowSlow: showslow.com
•   Webpage Test: webpagetest.org
•   Page Speed: code.google.com/speed/page-speed
Conclusion
• Don't optimise prematurely. Profile first.
• Go for the low hanging fruit. Configuration
  is cheaper than redevelopment.
• Performance is not the same as scalability,
  you probably need both.
• KISS
Credits
•   The following people were directly or indirectly
    involved in research leading to this content:
    •   Stoyan Stefanov, Nicole Sullivan, Tenni
        Theurer, Wayne Shea,
    •   Julien Lecompte, Iain Lamb, Philip Tellis,
        Subramanyan Murali,
    •   Nicholas Zakas, Jimmy Byrum, Steve Souders
•   http://developer.yahoo.net/performance
Questions
            Tom Hughes-Croucher
           croucher@yahoo-inc.com
        @sh1mmer & @ydn on Twitter



http://speakerrate.com/sh1mmer      Rate me!

More Related Content

What's hot

Minimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tipsMinimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tipsCgColors
 
Design and CSS
Design and CSSDesign and CSS
Design and CSSnolly00
 
Chris Lea - What does NoSQL Mean for You
Chris Lea - What does NoSQL Mean for YouChris Lea - What does NoSQL Mean for You
Chris Lea - What does NoSQL Mean for YouCarsonified Team
 
BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12ucbdrupal
 
Alfresco tech talk live public api episode 64
Alfresco tech talk live public api episode 64Alfresco tech talk live public api episode 64
Alfresco tech talk live public api episode 64Alfresco Software
 
Ws phpl1 php_apps_basics_1.2
Ws phpl1 php_apps_basics_1.2Ws phpl1 php_apps_basics_1.2
Ws phpl1 php_apps_basics_1.2Kensaku Suzuki
 
Searching the internet - what patent searchers should know
Searching the internet - what patent searchers should knowSearching the internet - what patent searchers should know
Searching the internet - what patent searchers should knowEric Sieverts
 
Search Engine Optimize for WordPress in 3 Easy Steps
Search Engine Optimize for WordPress in 3 Easy StepsSearch Engine Optimize for WordPress in 3 Easy Steps
Search Engine Optimize for WordPress in 3 Easy StepsAnna Belle Leiserson
 
Intro to Building & Marketing Your Own Website
Intro to Building & Marketing Your Own WebsiteIntro to Building & Marketing Your Own Website
Intro to Building & Marketing Your Own WebsiteTom McCracken
 
Code &amp; design your first website (3:16)
Code &amp; design your first website (3:16)Code &amp; design your first website (3:16)
Code &amp; design your first website (3:16)Thinkful
 
SEO made simple - SCDL Presentation
SEO made simple - SCDL PresentationSEO made simple - SCDL Presentation
SEO made simple - SCDL PresentationTheWebMob
 
How To Build An Accessible Web Application - a11yBos
How To Build An Accessible Web Application - a11yBosHow To Build An Accessible Web Application - a11yBos
How To Build An Accessible Web Application - a11yBosDennis Lembree
 
Code & Design your first website 4/18
Code & Design your first website 4/18Code & Design your first website 4/18
Code & Design your first website 4/18TJ Stalcup
 
Hyperlink.85 to 86
Hyperlink.85 to 86Hyperlink.85 to 86
Hyperlink.85 to 86myrajendra
 
All about WordPress Posts and Pages WordCamp 2013
All about WordPress Posts and Pages WordCamp 2013 All about WordPress Posts and Pages WordCamp 2013
All about WordPress Posts and Pages WordCamp 2013 New Tricks
 
Website tips and tweaks v2
Website tips and tweaks v2Website tips and tweaks v2
Website tips and tweaks v2Joe Seanor
 
SEO AJAX Crawlability in a Responsive Publisher World
SEO AJAX Crawlability in a Responsive Publisher WorldSEO AJAX Crawlability in a Responsive Publisher World
SEO AJAX Crawlability in a Responsive Publisher WorldEric Wu
 

What's hot (20)

Minimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tipsMinimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tips
 
Design and CSS
Design and CSSDesign and CSS
Design and CSS
 
Meta tag creation
Meta tag creationMeta tag creation
Meta tag creation
 
Chris Lea - What does NoSQL Mean for You
Chris Lea - What does NoSQL Mean for YouChris Lea - What does NoSQL Mean for You
Chris Lea - What does NoSQL Mean for You
 
BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12
 
Alfresco tech talk live public api episode 64
Alfresco tech talk live public api episode 64Alfresco tech talk live public api episode 64
Alfresco tech talk live public api episode 64
 
Doit marketing doit-marketing-webrd
Doit marketing doit-marketing-webrdDoit marketing doit-marketing-webrd
Doit marketing doit-marketing-webrd
 
Ws phpl1 php_apps_basics_1.2
Ws phpl1 php_apps_basics_1.2Ws phpl1 php_apps_basics_1.2
Ws phpl1 php_apps_basics_1.2
 
Searching the internet - what patent searchers should know
Searching the internet - what patent searchers should knowSearching the internet - what patent searchers should know
Searching the internet - what patent searchers should know
 
Search Engine Optimize for WordPress in 3 Easy Steps
Search Engine Optimize for WordPress in 3 Easy StepsSearch Engine Optimize for WordPress in 3 Easy Steps
Search Engine Optimize for WordPress in 3 Easy Steps
 
Intro to Building & Marketing Your Own Website
Intro to Building & Marketing Your Own WebsiteIntro to Building & Marketing Your Own Website
Intro to Building & Marketing Your Own Website
 
Code &amp; design your first website (3:16)
Code &amp; design your first website (3:16)Code &amp; design your first website (3:16)
Code &amp; design your first website (3:16)
 
wcmia2011
wcmia2011wcmia2011
wcmia2011
 
SEO made simple - SCDL Presentation
SEO made simple - SCDL PresentationSEO made simple - SCDL Presentation
SEO made simple - SCDL Presentation
 
How To Build An Accessible Web Application - a11yBos
How To Build An Accessible Web Application - a11yBosHow To Build An Accessible Web Application - a11yBos
How To Build An Accessible Web Application - a11yBos
 
Code & Design your first website 4/18
Code & Design your first website 4/18Code & Design your first website 4/18
Code & Design your first website 4/18
 
Hyperlink.85 to 86
Hyperlink.85 to 86Hyperlink.85 to 86
Hyperlink.85 to 86
 
All about WordPress Posts and Pages WordCamp 2013
All about WordPress Posts and Pages WordCamp 2013 All about WordPress Posts and Pages WordCamp 2013
All about WordPress Posts and Pages WordCamp 2013
 
Website tips and tweaks v2
Website tips and tweaks v2Website tips and tweaks v2
Website tips and tweaks v2
 
SEO AJAX Crawlability in a Responsive Publisher World
SEO AJAX Crawlability in a Responsive Publisher WorldSEO AJAX Crawlability in a Responsive Publisher World
SEO AJAX Crawlability in a Responsive Publisher World
 

Similar to Websites On Speed

Building Lightning Fast Websites (for Twin Cities .NET User Group)
Building Lightning Fast Websites (for Twin Cities .NET User Group)Building Lightning Fast Websites (for Twin Cities .NET User Group)
Building Lightning Fast Websites (for Twin Cities .NET User Group)strommen
 
Page Performance
Page PerformancePage Performance
Page Performanceatorreno
 
Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...
Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...
Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...Jay Hung
 
Windycityrails page performance
Windycityrails page performanceWindycityrails page performance
Windycityrails page performanceJohn McCaffrey
 
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 2013hernanibf
 
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 ApplicationsStoyan Stefanov
 
Why your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix itWhy your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix itstrommen
 
Why your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix itWhy your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix itRobert Flournoy
 
Frontera распределенный робот для обхода веба в больших объемах / Александр С...
Frontera распределенный робот для обхода веба в больших объемах / Александр С...Frontera распределенный робот для обхода веба в больших объемах / Александр С...
Frontera распределенный робот для обхода веба в больших объемах / Александр С...Ontico
 
Design Camp Boston - Designing Faster Websites
Design Camp Boston - Designing Faster WebsitesDesign Camp Boston - Designing Faster Websites
Design Camp Boston - Designing Faster WebsitesJonathan Klein
 
10 things you can do to speed up your web app today stir trek edition
10 things you can do to speed up your web app today   stir trek edition10 things you can do to speed up your web app today   stir trek edition
10 things you can do to speed up your web app today stir trek editionChris Love
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuningJohn McCaffrey
 
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...Amazon Web Services
 
Optimization of modern web applications
Optimization of modern web applicationsOptimization of modern web applications
Optimization of modern web applicationsEugene Lazutkin
 
Boost the Performance of SharePoint Today!
Boost the Performance of SharePoint Today!Boost the Performance of SharePoint Today!
Boost the Performance of SharePoint Today!Brian Culver
 
WordCamp 2012 - WordPress Webapps
WordCamp 2012 - WordPress WebappsWordCamp 2012 - WordPress Webapps
WordCamp 2012 - WordPress Webappstjasko
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonNeotys
 
How_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmHow_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmNigel Price
 

Similar to Websites On Speed (20)

Building Lightning Fast Websites (for Twin Cities .NET User Group)
Building Lightning Fast Websites (for Twin Cities .NET User Group)Building Lightning Fast Websites (for Twin Cities .NET User Group)
Building Lightning Fast Websites (for Twin Cities .NET User Group)
 
Page Performance
Page PerformancePage Performance
Page Performance
 
Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...
Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...
Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...
 
Windycityrails page performance
Windycityrails page performanceWindycityrails page performance
Windycityrails page performance
 
performance.ppt
performance.pptperformance.ppt
performance.ppt
 
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
 
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
 
Why your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix itWhy your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix it
 
Why your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix itWhy your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix it
 
Frontera распределенный робот для обхода веба в больших объемах / Александр С...
Frontera распределенный робот для обхода веба в больших объемах / Александр С...Frontera распределенный робот для обхода веба в больших объемах / Александр С...
Frontera распределенный робот для обхода веба в больших объемах / Александр С...
 
Design Camp Boston - Designing Faster Websites
Design Camp Boston - Designing Faster WebsitesDesign Camp Boston - Designing Faster Websites
Design Camp Boston - Designing Faster Websites
 
10 things you can do to speed up your web app today stir trek edition
10 things you can do to speed up your web app today   stir trek edition10 things you can do to speed up your web app today   stir trek edition
10 things you can do to speed up your web app today stir trek edition
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
 
Optimization of modern web applications
Optimization of modern web applicationsOptimization of modern web applications
Optimization of modern web applications
 
Boost the Performance of SharePoint Today!
Boost the Performance of SharePoint Today!Boost the Performance of SharePoint Today!
Boost the Performance of SharePoint Today!
 
WordCamp 2012 - WordPress Webapps
WordCamp 2012 - WordPress WebappsWordCamp 2012 - WordPress Webapps
WordCamp 2012 - WordPress Webapps
 
Speed Matters
Speed MattersSpeed Matters
Speed Matters
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark Tomlinson
 
How_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmHow_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_Farm
 

More from Tom Croucher

Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
Using Node.js to  Build Great  Streaming Services - HTML5 Dev ConfUsing Node.js to  Build Great  Streaming Services - HTML5 Dev Conf
Using Node.js to Build Great Streaming Services - HTML5 Dev ConfTom Croucher
 
Streams are Awesome - (Node.js) TimesOpen Sep 2012
Streams are Awesome - (Node.js) TimesOpen Sep 2012 Streams are Awesome - (Node.js) TimesOpen Sep 2012
Streams are Awesome - (Node.js) TimesOpen Sep 2012 Tom Croucher
 
Using Node.js to improve the performance of Mobile apps and Mobile web
Using Node.js to improve  the performance of  Mobile apps and Mobile webUsing Node.js to improve  the performance of  Mobile apps and Mobile web
Using Node.js to improve the performance of Mobile apps and Mobile webTom Croucher
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applicationsTom Croucher
 
Creating the Internet of Things with JavaScript - Fluent Conf
Creating the Internet of Things with JavaScript - Fluent ConfCreating the Internet of Things with JavaScript - Fluent Conf
Creating the Internet of Things with JavaScript - Fluent ConfTom Croucher
 
Using Node.js to make HTML5 work for everyone
Using Node.js to make HTML5 work for everyone Using Node.js to make HTML5 work for everyone
Using Node.js to make HTML5 work for everyone Tom Croucher
 
A million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleA million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleTom Croucher
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialTom Croucher
 
Lessons from a coding veteran - Web Directions @Media
Lessons from a coding veteran - Web Directions @MediaLessons from a coding veteran - Web Directions @Media
Lessons from a coding veteran - Web Directions @MediaTom Croucher
 
Multi-tiered Node Architectures - JSConf 2011
Multi-tiered Node Architectures - JSConf 2011Multi-tiered Node Architectures - JSConf 2011
Multi-tiered Node Architectures - JSConf 2011Tom Croucher
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...Tom Croucher
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...Tom Croucher
 
How to stop writing spaghetti code
How to stop writing spaghetti codeHow to stop writing spaghetti code
How to stop writing spaghetti codeTom Croucher
 
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions SouthDoing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions SouthTom Croucher
 
Doing Horrible Things to DNS in the Name of Science - SF Performance Meetup
Doing Horrible Things to DNS in the Name of Science - SF Performance MeetupDoing Horrible Things to DNS in the Name of Science - SF Performance Meetup
Doing Horrible Things to DNS in the Name of Science - SF Performance MeetupTom Croucher
 
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...Tom Croucher
 
How to stop writing spaghetti code - JSConf.eu 2010
How to stop writing spaghetti code - JSConf.eu 2010How to stop writing spaghetti code - JSConf.eu 2010
How to stop writing spaghetti code - JSConf.eu 2010Tom Croucher
 
Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming  Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming Tom Croucher
 
Server Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yetServer Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yetTom Croucher
 

More from Tom Croucher (20)

Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
Using Node.js to  Build Great  Streaming Services - HTML5 Dev ConfUsing Node.js to  Build Great  Streaming Services - HTML5 Dev Conf
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
 
Streams are Awesome - (Node.js) TimesOpen Sep 2012
Streams are Awesome - (Node.js) TimesOpen Sep 2012 Streams are Awesome - (Node.js) TimesOpen Sep 2012
Streams are Awesome - (Node.js) TimesOpen Sep 2012
 
Using Node.js to improve the performance of Mobile apps and Mobile web
Using Node.js to improve  the performance of  Mobile apps and Mobile webUsing Node.js to improve  the performance of  Mobile apps and Mobile web
Using Node.js to improve the performance of Mobile apps and Mobile web
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
 
Creating the Internet of Things with JavaScript - Fluent Conf
Creating the Internet of Things with JavaScript - Fluent ConfCreating the Internet of Things with JavaScript - Fluent Conf
Creating the Internet of Things with JavaScript - Fluent Conf
 
Using Node.js to make HTML5 work for everyone
Using Node.js to make HTML5 work for everyone Using Node.js to make HTML5 work for everyone
Using Node.js to make HTML5 work for everyone
 
A million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleA million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scale
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js Tutorial
 
Lessons from a coding veteran - Web Directions @Media
Lessons from a coding veteran - Web Directions @MediaLessons from a coding veteran - Web Directions @Media
Lessons from a coding veteran - Web Directions @Media
 
Multi-tiered Node Architectures - JSConf 2011
Multi-tiered Node Architectures - JSConf 2011Multi-tiered Node Architectures - JSConf 2011
Multi-tiered Node Architectures - JSConf 2011
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...
 
How to stop writing spaghetti code
How to stop writing spaghetti codeHow to stop writing spaghetti code
How to stop writing spaghetti code
 
Doing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions SouthDoing Horrible Things with DNS - Web Directions South
Doing Horrible Things with DNS - Web Directions South
 
Doing Horrible Things to DNS in the Name of Science - SF Performance Meetup
Doing Horrible Things to DNS in the Name of Science - SF Performance MeetupDoing Horrible Things to DNS in the Name of Science - SF Performance Meetup
Doing Horrible Things to DNS in the Name of Science - SF Performance Meetup
 
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
 
How to stop writing spaghetti code - JSConf.eu 2010
How to stop writing spaghetti code - JSConf.eu 2010How to stop writing spaghetti code - JSConf.eu 2010
How to stop writing spaghetti code - JSConf.eu 2010
 
Sf perf
Sf perfSf perf
Sf perf
 
Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming  Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming
 
Server Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yetServer Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yet
 

Recently uploaded

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

Websites On Speed

  • 1. Web Sites on Speed
  • 2.
  • 3.
  • 4.
  • 6. About me • Tom Hughes-Croucher
  • 7. About me • Tom Hughes-Croucher • @sh1mmer
  • 8. About me • Tom Hughes-Croucher • @sh1mmer • Yahoo! Technical Evangelist
  • 9. About me • Tom Hughes-Croucher • @sh1mmer • Yahoo! Technical Evangelist • Evangelism = stuff I believe in
  • 10. About me • Tom Hughes-Croucher • @sh1mmer • Yahoo! Technical Evangelist • Evangelism = stuff I believe in • Wrote Web Standards (W3C, BSI, etc)
  • 11. About me • Tom Hughes-Croucher • @sh1mmer • Yahoo! Technical Evangelist • Evangelism = stuff I believe in • Wrote Web Standards (W3C, BSI, etc) • Currently doing performance research
  • 13. Overview • What makes a web site slow?
  • 14. Overview • What makes a web site slow? • What can we do to make it faster?
  • 15. Overview • What makes a web site slow? • What can we do to make it faster? • What tools can help?
  • 16. Why are web sites slow? http://www.flickr.com/photos/topaz-mcnumpty/3544574591/sizes/l/
  • 17. What is a website made of?
  • 18. What is a website made of? • Content (HTML)
  • 19. What is a website made of? • Content (HTML) • Images / Flash
  • 20. What is a website made of? • Content (HTML) • Images / Flash • Styles (CSS)
  • 21. What is a website made of? • Content (HTML) • Images / Flash • Styles (CSS) • Interaction (JavaScript)
  • 22. What is a website made of? • Content (HTML) • Images / Flash • Styles (CSS) • Interaction (JavaScript) • Server farm
  • 23. What is a website made of? • Content (HTML) • Images / Flash • Styles (CSS) • Interaction (JavaScript) • Server farm • Maybe a database, Web services, CDN
  • 24. PHP is only a part 9% 91%
  • 25. Where does the time go?
  • 26. Where does the time go? • DNS lookups & HTTP requests
  • 27. Where does the time go? • DNS lookups & HTTP requests • Building pages
  • 28. Where does the time go? • DNS lookups & HTTP requests • Building pages • Downloading stuff
  • 29. Where does the time go? • DNS lookups & HTTP requests • Building pages • Downloading stuff • Rendering stuff
  • 30. Where does the time go? • DNS lookups & HTTP requests • Building pages • Downloading stuff • Rendering stuff • User Interaction
  • 32. How do we speed it up?
  • 33. How do we speed it up? • DNS lookups & HTTP requests
  • 34. How do we speed it up? • DNS lookups & HTTP ➡ Reduce lookups and requests connections
  • 35. How do we speed it up? • DNS lookups & HTTP ➡ Reduce lookups and requests connections • Building pages
  • 36. How do we speed it up? • DNS lookups & HTTP ➡ Reduce lookups and requests connections • Building pages ➡ Return content as fast as possible
  • 37. How do we speed it up? • DNS lookups & HTTP ➡ Reduce lookups and requests connections • Building pages ➡ Return content as fast as possible • Downloading stuff
  • 38. How do we speed it up? • DNS lookups & HTTP ➡ Reduce lookups and requests connections • Building pages ➡ Return content as fast as possible • Downloading stuff ➡ Reduce the size of content
  • 39. How do we speed it up? • DNS lookups & HTTP ➡ Reduce lookups and requests connections • Building pages ➡ Return content as fast as possible • Downloading stuff ➡ Reduce the size of content • Rendering stuff
  • 40. How do we speed it up? • DNS lookups & HTTP ➡ Reduce lookups and requests connections • Building pages ➡ Return content as fast as possible • Downloading stuff ➡ Reduce the size of content • Rendering stuff ➡ Structure pages for performance
  • 41. How do we speed it up? • DNS lookups & HTTP ➡ Reduce lookups and requests connections • Building pages ➡ Return content as fast as possible • Downloading stuff ➡ Reduce the size of content • Rendering stuff ➡ Structure pages for performance • User Interaction
  • 42. How do we speed it up? • DNS lookups & HTTP ➡ Reduce lookups and requests connections • Building pages ➡ Return content as fast as possible • Downloading stuff ➡ Reduce the size of content • Rendering stuff ➡ Structure pages for performance • User Interaction ➡ Cheat
  • 44. 1. Reduce DNS Lookups & connections
  • 45. 1. Reduce DNS Lookups & connections • Reduce the number of domains (2-4)
  • 46. 1. Reduce DNS Lookups & connections • Reduce the number of domains (2-4) • Avoid redirects
  • 47. 1. Reduce DNS Lookups & connections • Reduce the number of domains (2-4) • Avoid redirects • 301, 302, location.href=...
  • 48. 1. Reduce DNS Lookups & connections • Reduce the number of domains (2-4) • Avoid redirects • 301, 302, location.href=... • Combine CSS and Javascript files into a single file for each type
  • 49. Simple Combo Handler $combo = preg_replace('/^.*?/', '', $_SERVER['REQUEST_URI']); $sources = split('&', $combo); header('Content-type: text/javascript'); foreach($sources as $source) { // TODO: Verify that $source is safe and exists include("/var/www/$source"); }
  • 50. 1. Reduce DNS Lookups & connections
  • 51. 1. Reduce DNS Lookups & connections • Reduce the number of domains (2-4) • Avoid redirects • 301, 302, location.href=... • Combine CSS and Javascript files into a single file for each type
  • 52. 1. Reduce DNS Lookups & connections • Reduce the number of domains (2-4) • Avoid redirects • 301, 302, location.href=... • Combine CSS and Javascript files into a single file for each type • Combine decorative images into sprites
  • 53. 30px 30px 0px
  • 54.
  • 55. 1. Reduce DNS Lookups & connections
  • 56. 1. Reduce DNS Lookups & connections • Reduce the number of domains (2-4) • Avoid redirects • 301, 302, location.href=... • Combine CSS and Javascript files into a single file for each type • Combine decorative images into sprites
  • 57. 1. Reduce DNS Lookups & connections • Reduce the number of domains (2-4) • Avoid redirects • 301, 302, location.href=... • Combine CSS and Javascript files into a single file for each type • Combine decorative images into sprites • Cache aggressively
  • 58. 1. Reduce DNS Lookups & connections <Location /static> ExpiresActive On ExpiresDefault "access plus 1 year" </Location>
  • 60. 2. Return Quickly • Get the first chunk of bytes out as soon as possible
  • 61. 2. Return Quickly • Get the first chunk of bytes out as soon as possible • Flush often
  • 62.
  • 63.
  • 64.
  • 65.
  • 67. 2. Return Quickly • Get the first chunk of bytes out as soon as possible • Flush often
  • 68. 2. Return Quickly • Get the first chunk of bytes out as soon as possible • Flush often • Don't bother your server with static content
  • 69. 2. Return Quickly • Get the first chunk of bytes out as soon as possible • Flush often • Don't bother your server with static content • Cache expensive back end calls, and use a front-end cache
  • 70. 2. Return Quickly Cache expensive back end calls, and use a front-end cache
  • 72. 2. Return Quickly • Get the first chunk of bytes out as soon as possible • Flush often • Don't bother your server with static content • Cache expensive back end calls, and use a front-end cache
  • 73. 2. Return Quickly • Get the first chunk of bytes out as soon as possible • Flush often • Don't bother your server with static content • Cache expensive back end calls, and use a front-end cache • Reduce MaxClients in apache
  • 75. 3. Slim down • gzip content over the wire
  • 76. 3. Slim down • gzip content over the wire • Minify CSS and Javascript (use YUI Compressor) & Optimise images (use smush.it)
  • 77. 3. Slim down • gzip content over the wire • Minify CSS and Javascript (use YUI Compressor) & Optimise images (use smush.it) • Avoid duplicate CSS and Javascript files
  • 78. 3. Slim down • gzip content over the wire • Minify CSS and Javascript (use YUI Compressor) & Optimise images (use smush.it) • Avoid duplicate CSS and Javascript files • Reduce cookie size
  • 79. 3. Slim down • gzip content over the wire • Minify CSS and Javascript (use YUI Compressor) & Optimise images (use smush.it) • Avoid duplicate CSS and Javascript files • Reduce cookie size • Use a CDN
  • 80. 3. Slim down • gzip content over the wire • Minify CSS and Javascript (use YUI Compressor) & Optimise images (use smush.it) • Avoid duplicate CSS and Javascript files • Reduce cookie size • Use a CDN • Post-load components
  • 82. 4. Restructure pages • Put CSS at the top to avoid having to redraw the page later
  • 83. 4. Restructure pages • Put CSS at the top to avoid having to redraw the page later • Put Javascript at the bottom so that it doesn't block rendering
  • 84. 4. Restructure pages • Put CSS at the top to avoid having to redraw the page later • Put Javascript at the bottom so that it doesn't block rendering • Avoid tables for layout
  • 85. 4. Restructure pages • Put CSS at the top to avoid having to redraw the page later • Put Javascript at the bottom so that it doesn't block rendering • Avoid tables for layout • Delay loading of invisible content
  • 86. 4. Restructure pages • Put CSS at the top to avoid having to redraw the page later • Put Javascript at the bottom so that it doesn't block rendering • Avoid tables for layout • Delay loading of invisible content • Reduce the number of HTML elements
  • 88. 5. Cheat the DOM • Attach events on a container rather than on each element
  • 89. 5. Cheat the DOM • Attach events on a container rather than on each element • Delay event attachment
  • 90. 5. Cheat the DOM • Attach events on a container rather than on each element • Delay event attachment • Cache DOM elements and work on invisible elements
  • 91. 5. Cheat the DOM • Attach events on a container rather than on each element • Delay event attachment • Cache DOM elements and work on invisible elements • Reduce iterations on DOM elements
  • 92. 5. Cheat the DOM • Attach events on a container rather than on each element • Delay event attachment • Cache DOM elements and work on invisible elements • Reduce iterations on DOM elements • Use more specific, semantically correct HTML tags
  • 93. Use the right tags <div> <div> <input class="entry" name="larry"> <input class="entry" name="curly"> </div> <div> <input class="entry" name="moe"> </div> </div>
  • 94. Use the right tags <ul> <li> <input class="entry" name="larry"> <input class="entry" name="curly"> </li> <li> <input class="entry" name="moe"> </li> </ul>
  • 96. 5. Cheat the DOM • Attach events on a container rather than on each element • Delay event attachment • Cache DOM elements and work on invisible elements • Reduce iterations on DOM elements • Use more specific, semantically correct HTML tags
  • 97. 5. Cheat the DOM • Attach events on a container rather than on each element • Delay event attachment • Cache DOM elements and work on invisible elements • Reduce iterations on DOM elements • Use more specific, semantically correct HTML tags • Use local copies of global variables
  • 98. 5. Cheat the DOM • Attach events on a container rather than on each element • Delay event attachment • Cache DOM elements and work on invisible elements • Reduce iterations on DOM elements • Use more specific, semantically correct HTML tags • Use local copies of global variables • Profile your Javascript (use YUI Profiler)
  • 100. More tips • Preload expected content
  • 101.
  • 103. More tips • Preload expected content
  • 104. More tips • Preload expected content • Progressively enhance your pages
  • 107. More tips • Preload expected content • Progressively enhance your pages
  • 108. More tips • Preload expected content • Progressively enhance your pages • Use <link> instead of @import and avoid CSS expressions
  • 109. More tips • Preload expected content • Progressively enhance your pages • Use <link> instead of @import and avoid CSS expressions • Avoid 404s and reduce IFRAMEs
  • 110.
  • 111.
  • 112.
  • 114. More tips • Preload expected content • Progressively enhance your pages • Use <link> instead of @import and avoid CSS expressions • Avoid 404s and reduce IFRAMEs
  • 115. More tips • Preload expected content • Progressively enhance your pages • Use <link> instead of @import and avoid CSS expressions • Avoid 404s and reduce IFRAMEs • Turn off .htaccess
  • 116. YSlow
  • 117. YSlow • Firebug plugin to analyse pages for performance gotchas
  • 118. YSlow • Firebug plugin to analyse pages for performance gotchas • http://developer.yahoo.com/yslow/
  • 119. YSlow • Firebug plugin to analyse pages for performance gotchas • http://developer.yahoo.com/yslow/ • Follow YSlow's advice to improve page performance
  • 120. YSlow • Firebug plugin to analyse pages for performance gotchas • http://developer.yahoo.com/yslow/ • Follow YSlow's advice to improve page performance • Try Sergey Chernyshev's ShowSlow to automate YSlow usage
  • 121.
  • 123. Tools • YSlow: developer.yahoo.com/yslow/ • SmushIt: smushit.com • CSS Sprites: pt.spritegen.website-performance.org • YUI Profiler: developer.yahoo.com/yui/profiler/ • ShowSlow: showslow.com • Webpage Test: webpagetest.org • Page Speed: code.google.com/speed/page-speed
  • 124. Conclusion • Don't optimise prematurely. Profile first. • Go for the low hanging fruit. Configuration is cheaper than redevelopment. • Performance is not the same as scalability, you probably need both. • KISS
  • 125. Credits • The following people were directly or indirectly involved in research leading to this content: • Stoyan Stefanov, Nicole Sullivan, Tenni Theurer, Wayne Shea, • Julien Lecompte, Iain Lamb, Philip Tellis, Subramanyan Murali, • Nicholas Zakas, Jimmy Byrum, Steve Souders • http://developer.yahoo.net/performance
  • 126. Questions Tom Hughes-Croucher croucher@yahoo-inc.com @sh1mmer & @ydn on Twitter http://speakerrate.com/sh1mmer Rate me!