SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
Websites on Speed
Philip S Tellis
Yahoo! Inc

Percona Performance is Everything • April 22-23, 2009 • Santa
Clara, CA


$ whoami
flickr:code_martial/1543735477

     Philip Tellis
     geek / opensource developer
     yahoo
     @bluesmoon
     http://bluesmoon.info/


What's this talk all about?
flickr:justbecause/291874981

     Find out what makes a website slow
     Find out what to do to make it faster
     List some tools
     Show off pretty pictures from flickr


What's this talk all about?
flickr:justbecause/291874981

     Find out what makes a website slow
     Find out what to do to make it faster
     List some tools
     Show off pretty pictures from flickr


What's this talk all about?
flickr:justbecause/291874981

     Find out what makes a website slow
     Find out what to do to make it faster
     List some tools
     Show off pretty pictures from flickr
What's this talk all about?
flickr:justbecause/291874981

      Find out what makes a website slow
      Find out what to do to make it faster
      List some tools
      Show off pretty pictures from flickr


What's this talk all about?
flickr:justbecause/291874981

      Find out what makes a website slow
      Find out what to do to make it faster
      List some tools
      Show off pretty pictures from flickr


What's a website made of?
flickr:bounder/244867196

      Content (HTML)
      Images/Flash
      Style (CSS)
      Interaction (Javascript)
      A server farm below this
      Maybe a database, Web services & CDN


Where does the time go?
flickr:fabiolarebello/206950948

      DNS lookups & HTTP requests
      Building pages
      Downloading stuff
      Rendering stuff
      User Interaction


How do we fix it?
flickr:joe_gray/3292909762

      Reduce lookups and connections
      Return content as fast as possible
      Reduce the size of content
Structure pages for performance
     Cheat


1Fix it - reduce lookups
flickr:swanksalot/2453794337

     Reduce the number of domains
     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


1Fix it - reduce lookups
flickr:swanksalot/2453794337

     Reduce the number of domains
     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


1Fix it - reduce lookups
flickr:swanksalot/2453794337

     Reduce the number of domains
     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


1Fix it - reduce lookups
flickr:swanksalot/2453794337

     Reduce the number of domains
     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
1Fix it - reduce lookups
flickr:swanksalot/2453794337

Sample 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(quot;/var/www/$sourcequot;);
      }


1Fix it - reduce lookups
flickr:swanksalot/2453794337

     Reduce the number of domains
     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


1Fix it - reduce lookups
flickr:swanksalot/2453794337

     Reduce the number of domains
     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


1Fix it - reduce lookups
flickr:swanksalot/2453794337

     Reduce the number of domains
     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


1Fix it - reduce lookups
flickr:swanksalot/2453794337

    <Location /static>
       ExpiresActive On
       ExpiresDefault               quot;access plus 1 yearquot;
    </Location>


2Fix it - be quick on the return
flickr:revdancatt/197037896

     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


2Fix it - be quick on the return
flickr:revdancatt/197037896

     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


2Fix it - be quick on the return
flickr:revdancatt/197037896

     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


2Fix it - be quick on the return
flickr:revdancatt/197037896

     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


2Fix it - be quick on the return
flickr:revdancatt/197037896

     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


2Fix it - be quick on the return
flickr:revdancatt/197037896

     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


3Fix it - slim down
flickr:frosted_peppercorn/481102393

     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


3Fix it - slim down
flickr:frosted_peppercorn/481102393

     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


3Fix it - slim down
flickr:frosted_peppercorn/481102393

     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


3Fix it - slim down
flickr:frosted_peppercorn/481102393

     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


3Fix it - slim down
flickr:frosted_peppercorn/481102393

     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


3Fix it - slim down
flickr:frosted_peppercorn/481102393

     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


3Fix it - slim down
flickr:frosted_peppercorn/481102393

     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


4Fix it - restructure pages
flickr:bluesmoon/867742899

     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


4Fix it - restructure pages
flickr:bluesmoon/867742899

     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


4Fix it - restructure pages
flickr:bluesmoon/867742899

     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


4Fix it - restructure pages
flickr:bluesmoon/867742899

     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


4Fix it - restructure pages
flickr:bluesmoon/867742899

     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


4Fix it - restructure pages
flickr:bluesmoon/867742899

     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


5Fix it - cheat the DOM
flickr:matthewblack/2140930591

     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)


5Fix it - cheat the DOM
flickr:matthewblack/2140930591

     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)


5Fix it - cheat the DOM
flickr:matthewblack/2140930591

     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)


5Fix it - cheat the DOM
flickr:matthewblack/2140930591

     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)


5Fix it - cheat the DOM
flickr:matthewblack/2140930591

     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)


5Fix it - cheat the DOM
flickr:matthewblack/2140930591

     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)


5Fix it - cheat the DOM
flickr:matthewblack/2140930591

Old code:
<div>
       <div>
         <input class=quot;entryquot; name=quot;larryquot;>
         <input class=quot;entryquot; name=quot;curlyquot;>
       </div>
       <div>
         <input class=quot;entryquot; name=quot;moequot;>
       </div>
     </div>


5Fix it - cheat the DOM
flickr:matthewblack/2140930591

New code:

     <ul>
       <li>
          <input class=quot;entryquot; name=quot;larryquot;>
          <input class=quot;entryquot; name=quot;curlyquot;>
       </li>
       <li>
          <input class=quot;entryquot; name=quot;moequot;>
       </li>
     </ul>


5Fix it - cheat the DOM
flickr:matthewblack/2140930591

     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)


5Fix it - cheat the DOM
flickr:matthewblack/2140930591

     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)
5Fix it - cheat the DOM
flickr:matthewblack/2140930591

     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)


6More tips
flickr:eagereyes/2624337393

     Preload expected content
     Progressively enhance your pages
     Try to send empty POST requests
     Use <link> instead of @import and avoid CSS expressions
     Avoid 404s and reduce IFRAMEs


6More tips
flickr:eagereyes/2624337393

     Preload expected content
     Progressively enhance your pages
     Try to send empty POST requests
     Use <link> instead of @import and avoid CSS expressions
     Avoid 404s and reduce IFRAMEs


6More tips
flickr:eagereyes/2624337393

     Preload expected content
     Progressively enhance your pages
     Try to send empty POST requests
     Use <link> instead of @import and avoid CSS expressions
     Avoid 404s and reduce IFRAMEs


6More tips
flickr:eagereyes/2624337393

     Preload expected content
Progressively enhance your pages
      Try to send empty POST requests
      Use <link> instead of @import and avoid CSS expressions
      Avoid 404s and reduce IFRAMEs


6More tips
flickr:eagereyes/2624337393

      Preload expected content
      Progressively enhance your pages
      Try to send empty POST requests
      Use <link> instead of @import and avoid CSS expressions
      Avoid 404s and reduce IFRAMEs


6More tips
flickr:eagereyes/2624337393

      Preload expected content
      Progressively enhance your pages
      Try to send empty POST requests
      Use <link> instead of @import and avoid CSS expressions
      Avoid 404s and reduce IFRAMEs


YSlow
      Firebug plugin to analyse pages for performance gotchas
      http://developer.yahoo.com/yslow/
      Follow YSlow's advice to improve page performance
      v2.0 coming soon


Closing notes
flickr:thetaleoflight/3362048052

      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


Closing notes
flickr:thetaleoflight/3362048052

      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


Closing notes
flickr:thetaleoflight/3362048052

      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


Closing notes
flickr:thetaleoflight/3362048052

      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


Closing notes
flickr:thetaleoflight/3362048052

      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
flickr:jackhynes/519904699

      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
      http://developer.yahoo.net/performance


Photo Credits
flickr:25602112@N07/2539754489

      Shouts to each photographer for these most excellent CC licensed photos:
           http://flickr.com/photos/code_martial/1543735477/
           http://www.flickr.com/photos/justbecause/291874981/
http://flickr.com/photos/bounder/244867196/
           http://flickr.com/photos/fabiolarebello/206950948/
           http://www.flickr.com/photos/joe_gray/3292909762/
           http://flickr.com/photos/swanksalot/2453794337/
           http://flickr.com/photos/revdancatt/197037896/
           http://flickr.com/photos/frosted_peppercorn/481102393/
           http://flickr.com/photos/matthewblack/2140930591/
           http://flickr.com/photos/eagereyes/2624337393/
           http://flickr.com/photos/thetaleoflight/3362048052/
           http://flickr.com/photos/jackhynes/519904699/
           http://flickr.com/photos/25602112@N07/2539754489/

Made with Eric A Meyer's S5

Mais conteúdo relacionado

Mais procurados

Re-Experience SharePoint: Interface Enhancements in SharePoint 2010
Re-Experience SharePoint: Interface Enhancements in SharePoint 2010Re-Experience SharePoint: Interface Enhancements in SharePoint 2010
Re-Experience SharePoint: Interface Enhancements in SharePoint 2010Benjamin Niaulin
 
WordPress Security Presentation from South Florida WordPress Meetup
WordPress Security Presentation from South Florida WordPress MeetupWordPress Security Presentation from South Florida WordPress Meetup
WordPress Security Presentation from South Florida WordPress MeetupJohn Carcutt
 
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre ArmedaReno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre ArmedaDre Armeda
 
Arizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress ThemeArizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress Themecertainstrings
 
I - Front-end Spectrum
I - Front-end SpectrumI - Front-end Spectrum
I - Front-end SpectrumWebF
 
Creating Themes
Creating ThemesCreating Themes
Creating ThemesDaisyOlsen
 
WordPress SEO - SEO-Campixx
WordPress SEO - SEO-CampixxWordPress SEO - SEO-Campixx
WordPress SEO - SEO-Campixxsteffenhd
 
Doing Things the WordPress Way
Doing Things the WordPress WayDoing Things the WordPress Way
Doing Things the WordPress WayMatt Wiebe
 
Web Development From the Ground Up, a Series for Novice ...
Web Development From the Ground Up, a Series for Novice ...Web Development From the Ground Up, a Series for Novice ...
Web Development From the Ground Up, a Series for Novice ...webhostingguy
 
Lion features
Lion featuresLion features
Lion featuresbadoir
 

Mais procurados (11)

Re-Experience SharePoint: Interface Enhancements in SharePoint 2010
Re-Experience SharePoint: Interface Enhancements in SharePoint 2010Re-Experience SharePoint: Interface Enhancements in SharePoint 2010
Re-Experience SharePoint: Interface Enhancements in SharePoint 2010
 
Wordpress & HTML5 by Rob Larsen
Wordpress & HTML5 by Rob LarsenWordpress & HTML5 by Rob Larsen
Wordpress & HTML5 by Rob Larsen
 
WordPress Security Presentation from South Florida WordPress Meetup
WordPress Security Presentation from South Florida WordPress MeetupWordPress Security Presentation from South Florida WordPress Meetup
WordPress Security Presentation from South Florida WordPress Meetup
 
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre ArmedaReno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
 
Arizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress ThemeArizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress Theme
 
I - Front-end Spectrum
I - Front-end SpectrumI - Front-end Spectrum
I - Front-end Spectrum
 
Creating Themes
Creating ThemesCreating Themes
Creating Themes
 
WordPress SEO - SEO-Campixx
WordPress SEO - SEO-CampixxWordPress SEO - SEO-Campixx
WordPress SEO - SEO-Campixx
 
Doing Things the WordPress Way
Doing Things the WordPress WayDoing Things the WordPress Way
Doing Things the WordPress Way
 
Web Development From the Ground Up, a Series for Novice ...
Web Development From the Ground Up, a Series for Novice ...Web Development From the Ground Up, a Series for Novice ...
Web Development From the Ground Up, a Series for Novice ...
 
Lion features
Lion featuresLion features
Lion features
 

Destaque

How To Think About Performance
How To Think About PerformanceHow To Think About Performance
How To Think About PerformancePerconaPerformance
 
Stones play for wiki
Stones play for wikiStones play for wiki
Stones play for wikilaurenesam
 
Performance Instrumentation Beyond What You Do Now
Performance  Instrumentation  Beyond  What  You  Do  NowPerformance  Instrumentation  Beyond  What  You  Do  Now
Performance Instrumentation Beyond What You Do NowPerconaPerformance
 
My S Q L Replication Getting The Most From Slaves
My S Q L  Replication  Getting  The  Most  From  SlavesMy S Q L  Replication  Getting  The  Most  From  Slaves
My S Q L Replication Getting The Most From SlavesPerconaPerformance
 
Object Oriented Css For High Performance Websites And Applications
Object Oriented Css For High Performance Websites And ApplicationsObject Oriented Css For High Performance Websites And Applications
Object Oriented Css For High Performance Websites And ApplicationsPerconaPerformance
 
Ict Examples Presentation 1210756047278583 9
Ict Examples Presentation 1210756047278583 9Ict Examples Presentation 1210756047278583 9
Ict Examples Presentation 1210756047278583 9laurenesam
 
Database Performance With Proxy Architectures
Database  Performance With  Proxy  ArchitecturesDatabase  Performance With  Proxy  Architectures
Database Performance With Proxy ArchitecturesPerconaPerformance
 
Running A Realtime Stats Service On My Sql
Running A Realtime Stats Service On My SqlRunning A Realtime Stats Service On My Sql
Running A Realtime Stats Service On My SqlPerconaPerformance
 
Galera Multi Master Synchronous My S Q L Replication Clusters
Galera  Multi Master  Synchronous  My S Q L  Replication  ClustersGalera  Multi Master  Synchronous  My S Q L  Replication  Clusters
Galera Multi Master Synchronous My S Q L Replication ClustersPerconaPerformance
 
Trees And More With Postgre S Q L
Trees And  More With  Postgre S Q LTrees And  More With  Postgre S Q L
Trees And More With Postgre S Q LPerconaPerformance
 
E M T Better Performance Monitoring
E M T  Better  Performance  MonitoringE M T  Better  Performance  Monitoring
E M T Better Performance MonitoringPerconaPerformance
 
Drizzles Approach To Improving Performance Of The Server
Drizzles  Approach To  Improving  Performance Of The  ServerDrizzles  Approach To  Improving  Performance Of The  Server
Drizzles Approach To Improving Performance Of The ServerPerconaPerformance
 
Boost Performance With My S Q L 51 Partitions
Boost Performance With  My S Q L 51 PartitionsBoost Performance With  My S Q L 51 Partitions
Boost Performance With My S Q L 51 PartitionsPerconaPerformance
 
Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And MavenPerconaPerformance
 

Destaque (17)

How To Think About Performance
How To Think About PerformanceHow To Think About Performance
How To Think About Performance
 
Stones play for wiki
Stones play for wikiStones play for wiki
Stones play for wiki
 
Performance Instrumentation Beyond What You Do Now
Performance  Instrumentation  Beyond  What  You  Do  NowPerformance  Instrumentation  Beyond  What  You  Do  Now
Performance Instrumentation Beyond What You Do Now
 
My S Q L Replication Getting The Most From Slaves
My S Q L  Replication  Getting  The  Most  From  SlavesMy S Q L  Replication  Getting  The  Most  From  Slaves
My S Q L Replication Getting The Most From Slaves
 
Object Oriented Css For High Performance Websites And Applications
Object Oriented Css For High Performance Websites And ApplicationsObject Oriented Css For High Performance Websites And Applications
Object Oriented Css For High Performance Websites And Applications
 
Ict Examples Presentation 1210756047278583 9
Ict Examples Presentation 1210756047278583 9Ict Examples Presentation 1210756047278583 9
Ict Examples Presentation 1210756047278583 9
 
Database Performance With Proxy Architectures
Database  Performance With  Proxy  ArchitecturesDatabase  Performance With  Proxy  Architectures
Database Performance With Proxy Architectures
 
High Performance Erlang
High  Performance  ErlangHigh  Performance  Erlang
High Performance Erlang
 
Running A Realtime Stats Service On My Sql
Running A Realtime Stats Service On My SqlRunning A Realtime Stats Service On My Sql
Running A Realtime Stats Service On My Sql
 
Galera Multi Master Synchronous My S Q L Replication Clusters
Galera  Multi Master  Synchronous  My S Q L  Replication  ClustersGalera  Multi Master  Synchronous  My S Q L  Replication  Clusters
Galera Multi Master Synchronous My S Q L Replication Clusters
 
Maailma LõPus
Maailma LõPusMaailma LõPus
Maailma LõPus
 
Trees And More With Postgre S Q L
Trees And  More With  Postgre S Q LTrees And  More With  Postgre S Q L
Trees And More With Postgre S Q L
 
Websites On Speed
Websites On  SpeedWebsites On  Speed
Websites On Speed
 
E M T Better Performance Monitoring
E M T  Better  Performance  MonitoringE M T  Better  Performance  Monitoring
E M T Better Performance Monitoring
 
Drizzles Approach To Improving Performance Of The Server
Drizzles  Approach To  Improving  Performance Of The  ServerDrizzles  Approach To  Improving  Performance Of The  Server
Drizzles Approach To Improving Performance Of The Server
 
Boost Performance With My S Q L 51 Partitions
Boost Performance With  My S Q L 51 PartitionsBoost Performance With  My S Q L 51 Partitions
Boost Performance With My S Q L 51 Partitions
 
Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And Maven
 

Semelhante a Websites On Speed

The web is too slow
The web is too slow The web is too slow
The web is too slow Andy Davies
 
The case for HTTP/2
The case for HTTP/2The case for HTTP/2
The case for HTTP/2GreeceJS
 
The Case for HTTP/2 - GreeceJS - June 2016
The Case for HTTP/2 -  GreeceJS - June 2016The Case for HTTP/2 -  GreeceJS - June 2016
The Case for HTTP/2 - GreeceJS - June 2016Andy Davies
 
WordPress for Libraries PreConference Workshop
WordPress for Libraries PreConference WorkshopWordPress for Libraries PreConference Workshop
WordPress for Libraries PreConference WorkshopPolly Farrington
 
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?Andy Davies
 
Heavy Web Optimization: Frontend
Heavy Web Optimization: FrontendHeavy Web Optimization: Frontend
Heavy Web Optimization: FrontendVõ Duy Tuấn
 
TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單偉格 高
 
前瞻性Web性能优化pwpo
前瞻性Web性能优化pwpo前瞻性Web性能优化pwpo
前瞻性Web性能优化pwpoMichael Zhang
 
5 steps to faster web sites & HTML5 games - updated for DDDscot
5 steps to faster web sites & HTML5 games - updated for DDDscot5 steps to faster web sites & HTML5 games - updated for DDDscot
5 steps to faster web sites & HTML5 games - updated for DDDscotMichael Ewins
 
Mobile Web Speed Bumps
Mobile Web Speed BumpsMobile Web Speed Bumps
Mobile Web Speed BumpsNicholas Zakas
 
Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0Estelle Weyl
 
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps FasterPractical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps FasterDoris Chen
 
Even faster web sites
Even faster web sitesEven faster web sites
Even faster web sitesFelipe Lavín
 
Proactive Web Performance Optimization.(Marcel Duran)
Proactive Web Performance Optimization.(Marcel Duran)Proactive Web Performance Optimization.(Marcel Duran)
Proactive Web Performance Optimization.(Marcel Duran)Ontico
 
Http/2 - What's it all about?
Http/2  - What's it all about?Http/2  - What's it all about?
Http/2 - What's it all about?Andy Davies
 
The Case for HTTP/2 - Internetdagarna 2015 - Stockholm
The Case for HTTP/2  - Internetdagarna 2015 - StockholmThe Case for HTTP/2  - Internetdagarna 2015 - Stockholm
The Case for HTTP/2 - Internetdagarna 2015 - StockholmAndy Davies
 
About Flink streaming
About Flink streamingAbout Flink streaming
About Flink streaming용휘 김
 
It's Business Time: Givin' User Experience Love with CSS3
It's Business Time: Givin' User Experience Love with CSS3It's Business Time: Givin' User Experience Love with CSS3
It's Business Time: Givin' User Experience Love with CSS3Denise Jacobs
 

Semelhante a Websites On Speed (20)

The web is too slow
The web is too slow The web is too slow
The web is too slow
 
The case for HTTP/2
The case for HTTP/2The case for HTTP/2
The case for HTTP/2
 
The Case for HTTP/2 - GreeceJS - June 2016
The Case for HTTP/2 -  GreeceJS - June 2016The Case for HTTP/2 -  GreeceJS - June 2016
The Case for HTTP/2 - GreeceJS - June 2016
 
WordPress for Libraries PreConference Workshop
WordPress for Libraries PreConference WorkshopWordPress for Libraries PreConference Workshop
WordPress for Libraries PreConference Workshop
 
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
 
Heavy Web Optimization: Frontend
Heavy Web Optimization: FrontendHeavy Web Optimization: Frontend
Heavy Web Optimization: Frontend
 
TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單
 
前瞻性Web性能优化pwpo
前瞻性Web性能优化pwpo前瞻性Web性能优化pwpo
前瞻性Web性能优化pwpo
 
5 steps to faster web sites & HTML5 games - updated for DDDscot
5 steps to faster web sites & HTML5 games - updated for DDDscot5 steps to faster web sites & HTML5 games - updated for DDDscot
5 steps to faster web sites & HTML5 games - updated for DDDscot
 
Mobile Web Speed Bumps
Mobile Web Speed BumpsMobile Web Speed Bumps
Mobile Web Speed Bumps
 
Websites On Speed
Websites On SpeedWebsites On Speed
Websites On Speed
 
Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0
 
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps FasterPractical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
 
Even faster web sites
Even faster web sitesEven faster web sites
Even faster web sites
 
Proactive Web Performance Optimization.(Marcel Duran)
Proactive Web Performance Optimization.(Marcel Duran)Proactive Web Performance Optimization.(Marcel Duran)
Proactive Web Performance Optimization.(Marcel Duran)
 
Http/2 - What's it all about?
Http/2  - What's it all about?Http/2  - What's it all about?
Http/2 - What's it all about?
 
NCompass Live: RSS: Feed Me
NCompass Live: RSS: Feed MeNCompass Live: RSS: Feed Me
NCompass Live: RSS: Feed Me
 
The Case for HTTP/2 - Internetdagarna 2015 - Stockholm
The Case for HTTP/2  - Internetdagarna 2015 - StockholmThe Case for HTTP/2  - Internetdagarna 2015 - Stockholm
The Case for HTTP/2 - Internetdagarna 2015 - Stockholm
 
About Flink streaming
About Flink streamingAbout Flink streaming
About Flink streaming
 
It's Business Time: Givin' User Experience Love with CSS3
It's Business Time: Givin' User Experience Love with CSS3It's Business Time: Givin' User Experience Love with CSS3
It's Business Time: Givin' User Experience Love with CSS3
 

Último

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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 SolutionsEnterprise Knowledge
 
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 Scriptwesley chun
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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 WorkerThousandEyes
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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...Miguel Araújo
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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.pdfsudhanshuwaghmare1
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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 2024The Digital Insurer
 
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 educationjfdjdjcjdnsjd
 

Último (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
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
 

Websites On Speed

  • 1. Websites on Speed Philip S Tellis Yahoo! Inc Percona Performance is Everything • April 22-23, 2009 • Santa Clara, CA $ whoami flickr:code_martial/1543735477 Philip Tellis geek / opensource developer yahoo @bluesmoon http://bluesmoon.info/ What's this talk all about? flickr:justbecause/291874981 Find out what makes a website slow Find out what to do to make it faster List some tools Show off pretty pictures from flickr What's this talk all about? flickr:justbecause/291874981 Find out what makes a website slow Find out what to do to make it faster List some tools Show off pretty pictures from flickr What's this talk all about? flickr:justbecause/291874981 Find out what makes a website slow Find out what to do to make it faster List some tools Show off pretty pictures from flickr
  • 2. What's this talk all about? flickr:justbecause/291874981 Find out what makes a website slow Find out what to do to make it faster List some tools Show off pretty pictures from flickr What's this talk all about? flickr:justbecause/291874981 Find out what makes a website slow Find out what to do to make it faster List some tools Show off pretty pictures from flickr What's a website made of? flickr:bounder/244867196 Content (HTML) Images/Flash Style (CSS) Interaction (Javascript) A server farm below this Maybe a database, Web services & CDN Where does the time go? flickr:fabiolarebello/206950948 DNS lookups & HTTP requests Building pages Downloading stuff Rendering stuff User Interaction How do we fix it? flickr:joe_gray/3292909762 Reduce lookups and connections Return content as fast as possible Reduce the size of content
  • 3. Structure pages for performance Cheat 1Fix it - reduce lookups flickr:swanksalot/2453794337 Reduce the number of domains 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 1Fix it - reduce lookups flickr:swanksalot/2453794337 Reduce the number of domains 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 1Fix it - reduce lookups flickr:swanksalot/2453794337 Reduce the number of domains 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 1Fix it - reduce lookups flickr:swanksalot/2453794337 Reduce the number of domains 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
  • 4. 1Fix it - reduce lookups flickr:swanksalot/2453794337 Sample 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(quot;/var/www/$sourcequot;); } 1Fix it - reduce lookups flickr:swanksalot/2453794337 Reduce the number of domains 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 1Fix it - reduce lookups flickr:swanksalot/2453794337 Reduce the number of domains 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 1Fix it - reduce lookups flickr:swanksalot/2453794337 Reduce the number of domains Avoid redirects 301, 302, location.href=... Combine CSS and Javascript files into a single file for each type Combine decorative images into sprites
  • 5. Cache aggressively 1Fix it - reduce lookups flickr:swanksalot/2453794337 <Location /static> ExpiresActive On ExpiresDefault quot;access plus 1 yearquot; </Location> 2Fix it - be quick on the return flickr:revdancatt/197037896 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 2Fix it - be quick on the return flickr:revdancatt/197037896 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 2Fix it - be quick on the return flickr:revdancatt/197037896 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 2Fix it - be quick on the return flickr:revdancatt/197037896 Get the first chunk of bytes out as soon as possible Flush often
  • 6. Don't bother your server with static content Cache expensive back end calls, and use a front-end cache Reduce MaxClients in apache 2Fix it - be quick on the return flickr:revdancatt/197037896 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 2Fix it - be quick on the return flickr:revdancatt/197037896 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 3Fix it - slim down flickr:frosted_peppercorn/481102393 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 3Fix it - slim down flickr:frosted_peppercorn/481102393 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 3Fix it - slim down
  • 7. flickr:frosted_peppercorn/481102393 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 3Fix it - slim down flickr:frosted_peppercorn/481102393 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 3Fix it - slim down flickr:frosted_peppercorn/481102393 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 3Fix it - slim down flickr:frosted_peppercorn/481102393 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 3Fix it - slim down flickr:frosted_peppercorn/481102393 gzip content over the wire
  • 8. 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 4Fix it - restructure pages flickr:bluesmoon/867742899 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 4Fix it - restructure pages flickr:bluesmoon/867742899 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 4Fix it - restructure pages flickr:bluesmoon/867742899 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 4Fix it - restructure pages flickr:bluesmoon/867742899 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 4Fix it - restructure pages
  • 9. flickr:bluesmoon/867742899 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 4Fix it - restructure pages flickr:bluesmoon/867742899 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 5Fix it - cheat the DOM flickr:matthewblack/2140930591 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) 5Fix it - cheat the DOM flickr:matthewblack/2140930591 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) 5Fix it - cheat the DOM flickr:matthewblack/2140930591 Attach events on a container rather than on each element
  • 10. 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) 5Fix it - cheat the DOM flickr:matthewblack/2140930591 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) 5Fix it - cheat the DOM flickr:matthewblack/2140930591 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) 5Fix it - cheat the DOM flickr:matthewblack/2140930591 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) 5Fix it - cheat the DOM flickr:matthewblack/2140930591 Old code:
  • 11. <div> <div> <input class=quot;entryquot; name=quot;larryquot;> <input class=quot;entryquot; name=quot;curlyquot;> </div> <div> <input class=quot;entryquot; name=quot;moequot;> </div> </div> 5Fix it - cheat the DOM flickr:matthewblack/2140930591 New code: <ul> <li> <input class=quot;entryquot; name=quot;larryquot;> <input class=quot;entryquot; name=quot;curlyquot;> </li> <li> <input class=quot;entryquot; name=quot;moequot;> </li> </ul> 5Fix it - cheat the DOM flickr:matthewblack/2140930591 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) 5Fix it - cheat the DOM flickr:matthewblack/2140930591 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)
  • 12. 5Fix it - cheat the DOM flickr:matthewblack/2140930591 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) 6More tips flickr:eagereyes/2624337393 Preload expected content Progressively enhance your pages Try to send empty POST requests Use <link> instead of @import and avoid CSS expressions Avoid 404s and reduce IFRAMEs 6More tips flickr:eagereyes/2624337393 Preload expected content Progressively enhance your pages Try to send empty POST requests Use <link> instead of @import and avoid CSS expressions Avoid 404s and reduce IFRAMEs 6More tips flickr:eagereyes/2624337393 Preload expected content Progressively enhance your pages Try to send empty POST requests Use <link> instead of @import and avoid CSS expressions Avoid 404s and reduce IFRAMEs 6More tips flickr:eagereyes/2624337393 Preload expected content
  • 13. Progressively enhance your pages Try to send empty POST requests Use <link> instead of @import and avoid CSS expressions Avoid 404s and reduce IFRAMEs 6More tips flickr:eagereyes/2624337393 Preload expected content Progressively enhance your pages Try to send empty POST requests Use <link> instead of @import and avoid CSS expressions Avoid 404s and reduce IFRAMEs 6More tips flickr:eagereyes/2624337393 Preload expected content Progressively enhance your pages Try to send empty POST requests Use <link> instead of @import and avoid CSS expressions Avoid 404s and reduce IFRAMEs YSlow Firebug plugin to analyse pages for performance gotchas http://developer.yahoo.com/yslow/ Follow YSlow's advice to improve page performance v2.0 coming soon Closing notes flickr:thetaleoflight/3362048052 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 Closing notes flickr:thetaleoflight/3362048052 Don't optimise prematurely. Profile first. Go for the low hanging fruit. Configuration is cheaper than redevelopment.
  • 14. Performance is not the same as scalability, you probably need both. KISS Closing notes flickr:thetaleoflight/3362048052 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 Closing notes flickr:thetaleoflight/3362048052 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 Closing notes flickr:thetaleoflight/3362048052 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 flickr:jackhynes/519904699 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 http://developer.yahoo.net/performance Photo Credits flickr:25602112@N07/2539754489 Shouts to each photographer for these most excellent CC licensed photos: http://flickr.com/photos/code_martial/1543735477/ http://www.flickr.com/photos/justbecause/291874981/
  • 15. http://flickr.com/photos/bounder/244867196/ http://flickr.com/photos/fabiolarebello/206950948/ http://www.flickr.com/photos/joe_gray/3292909762/ http://flickr.com/photos/swanksalot/2453794337/ http://flickr.com/photos/revdancatt/197037896/ http://flickr.com/photos/frosted_peppercorn/481102393/ http://flickr.com/photos/matthewblack/2140930591/ http://flickr.com/photos/eagereyes/2624337393/ http://flickr.com/photos/thetaleoflight/3362048052/ http://flickr.com/photos/jackhynes/519904699/ http://flickr.com/photos/25602112@N07/2539754489/ Made with Eric A Meyer's S5