SlideShare uma empresa Scribd logo
1 de 40
Caching For Cash Dutch PHP Conference – Amsterdam,  June 2009
 
 
 
 
 
80%   of response time is spent downloading content
 
 
“ It all depends on how we look at things, and not how they are in  themselves.” - Carl G. Jung
 
 
Key factor in performance Fewer HTTP Requests Easy to improve on
Sent with static content Slow upstream speed Big cookies
Cookie Size Response Time (Delta) 0 bytes 78 ms  (  0 ms ) 500 bytes 79 ms  (  +1 ms ) 1000 bytes 94 ms  ( +16 ms ) 1500 bytes 109 ms ( +31 ms ) 2000 bytes 125 ms ( +47 ms ) 2500 bytes 141 ms ( +63 ms ) 3000 bytes 156 ms ( +78 ms ) Times are for page loads on DSL (~800 kbps).
Eliminate unnecessary cookies Keep sizes low Appropriate domain levels Set Expires date appropriately
Be aware of max connection limits in browsers CNAME to point multiple sub domains to the same IP
One domain = 2 Parallel connections
Two domains = 4 Parallel connections
Too many hostnames can cause complications 2 – 4 sub domains is a  good  average
Combining  6  scripts into  1  eliminates  5  requests Challenges:  ,[object Object]
combinations vs. loading more than needed
JS does not comply with the parallel downloading rule
script defer  attribute is not a solution ,[object Object]
slight blocking in IE Solution:  move them as low in the page as possible
Crushes the files Strips out all cruft Voodoo magic
JSMin Dojo Shrinksafe Packer YUI Compressor http://short.ie/compression-rates
You  can  affect users download times
[object Object],[object Object]
CSS
XML
JSON
[object Object],[object Object]
PDFs
Compressed data formats
robots.txt favicon
CSS Sprites
Badly optimized Thumbnails PNG can be compacted 50%, no quality loss OptiPNG
Test on slow connections Slow proxies for developers
Data served through a single domain Smart routing software Data closer to the end user – Less latency

Mais conteúdo relacionado

Mais procurados

Александр Сергиенко, Senior Android Developer, DataArt
Александр Сергиенко, Senior Android Developer, DataArtАлександр Сергиенко, Senior Android Developer, DataArt
Александр Сергиенко, Senior Android Developer, DataArt
Alina Vilk
 
Donatas Mažionis, Building low latency web APIs
Donatas Mažionis, Building low latency web APIsDonatas Mažionis, Building low latency web APIs
Donatas Mažionis, Building low latency web APIs
Tanya Denisyuk
 
Performance optimization - JavaScript
Performance optimization - JavaScriptPerformance optimization - JavaScript
Performance optimization - JavaScript
Filip Mares
 
Performance optimization - Basics
Performance optimization - BasicsPerformance optimization - Basics
Performance optimization - Basics
Filip Mares
 

Mais procurados (20)

Delivering Javascript to World+Dog
Delivering Javascript to World+DogDelivering Javascript to World+Dog
Delivering Javascript to World+Dog
 
PyGotham 2014 Introduction to Profiling
PyGotham 2014 Introduction to ProfilingPyGotham 2014 Introduction to Profiling
PyGotham 2014 Introduction to Profiling
 
Introduction to performance tuning perl web applications
Introduction to performance tuning perl web applicationsIntroduction to performance tuning perl web applications
Introduction to performance tuning perl web applications
 
3 Tips for a better mobile User Experience
3 Tips for a better mobile User Experience3 Tips for a better mobile User Experience
3 Tips for a better mobile User Experience
 
Writing Java Serverless Application Using Micronaut
Writing Java Serverless Application Using MicronautWriting Java Serverless Application Using Micronaut
Writing Java Serverless Application Using Micronaut
 
Александр Сергиенко, Senior Android Developer, DataArt
Александр Сергиенко, Senior Android Developer, DataArtАлександр Сергиенко, Senior Android Developer, DataArt
Александр Сергиенко, Senior Android Developer, DataArt
 
Web performance optimization - MercadoLibre
Web performance optimization - MercadoLibreWeb performance optimization - MercadoLibre
Web performance optimization - MercadoLibre
 
Building Scalable Websites with Perl
Building Scalable Websites with PerlBuilding Scalable Websites with Perl
Building Scalable Websites with Perl
 
PHP Servers Optimization slides
PHP Servers Optimization slidesPHP Servers Optimization slides
PHP Servers Optimization slides
 
Speed Up Wordpress, Wordpress Horsepower
Speed Up Wordpress, Wordpress HorsepowerSpeed Up Wordpress, Wordpress Horsepower
Speed Up Wordpress, Wordpress Horsepower
 
Donatas Mažionis, Building low latency web APIs
Donatas Mažionis, Building low latency web APIsDonatas Mažionis, Building low latency web APIs
Donatas Mažionis, Building low latency web APIs
 
Performance optimization - JavaScript
Performance optimization - JavaScriptPerformance optimization - JavaScript
Performance optimization - JavaScript
 
Performance optimization - Basics
Performance optimization - BasicsPerformance optimization - Basics
Performance optimization - Basics
 
Dos threats and countermeasures
Dos threats and countermeasuresDos threats and countermeasures
Dos threats and countermeasures
 
5 things MySql
5 things MySql5 things MySql
5 things MySql
 
Spreadshirt Techcamp 2018 - Hold until Told
Spreadshirt Techcamp 2018 - Hold until ToldSpreadshirt Techcamp 2018 - Hold until Told
Spreadshirt Techcamp 2018 - Hold until Told
 
Performace optimizations and frontend happiness
Performace optimizations and frontend happinessPerformace optimizations and frontend happiness
Performace optimizations and frontend happiness
 
Django and Nginx reverse proxy cache
Django and Nginx reverse proxy cacheDjango and Nginx reverse proxy cache
Django and Nginx reverse proxy cache
 
Preparing your web services for Android and your Android app for web services...
Preparing your web services for Android and your Android app for web services...Preparing your web services for Android and your Android app for web services...
Preparing your web services for Android and your Android app for web services...
 
The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js
The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.jsThe MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js
The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js
 

Destaque (8)

Zend Server: A Guided Tour
Zend Server: A Guided TourZend Server: A Guided Tour
Zend Server: A Guided Tour
 
Tiery Eyed
Tiery EyedTiery Eyed
Tiery Eyed
 
Taming the Deployment Beast
Taming the Deployment BeastTaming the Deployment Beast
Taming the Deployment Beast
 
Kewelta´s Portal New Design
Kewelta´s Portal New DesignKewelta´s Portal New Design
Kewelta´s Portal New Design
 
Planning for Synchronization with Browser-Local Databases
Planning for Synchronization with Browser-Local DatabasesPlanning for Synchronization with Browser-Local Databases
Planning for Synchronization with Browser-Local Databases
 
Roniere Santos DireçãO De Arte Pedotti
Roniere Santos DireçãO De Arte PedottiRoniere Santos DireçãO De Arte Pedotti
Roniere Santos DireçãO De Arte Pedotti
 
Dr. GVR Sastry - Speaker Profile(1) (1)
Dr. GVR Sastry - Speaker Profile(1) (1)Dr. GVR Sastry - Speaker Profile(1) (1)
Dr. GVR Sastry - Speaker Profile(1) (1)
 
Lessons From Cahokia1
Lessons From Cahokia1Lessons From Cahokia1
Lessons From Cahokia1
 

Semelhante a Caching for Cash, part 4 DPC 2009

Semelhante a Caching for Cash, part 4 DPC 2009 (20)

Client Side Performance @ Xero
Client Side Performance @ XeroClient Side Performance @ Xero
Client Side Performance @ Xero
 
A little journey into website optimization
A little journey into website optimizationA little journey into website optimization
A little journey into website optimization
 
Oracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance TuningOracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance Tuning
 
Breaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites WinBreaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites Win
 
Web performance Talk
Web performance TalkWeb performance Talk
Web performance Talk
 
Front-end performances
Front-end performancesFront-end performances
Front-end performances
 
Front-End Web Performance Optimization by BucketSoft
Front-End Web Performance Optimization by BucketSoftFront-End Web Performance Optimization by BucketSoft
Front-End Web Performance Optimization by BucketSoft
 
Performance and optimization CakeFest 2014
Performance and optimization CakeFest 2014Performance and optimization CakeFest 2014
Performance and optimization CakeFest 2014
 
Magento Performance Improvements with Client Side Optimizations
Magento Performance Improvements with Client Side OptimizationsMagento Performance Improvements with Client Side Optimizations
Magento Performance Improvements with Client Side Optimizations
 
Making it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceMaking it fast: Zotonic & Performance
Making it fast: Zotonic & Performance
 
Performance engineering
Performance engineeringPerformance engineering
Performance engineering
 
Configuring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web PerormanceConfiguring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web Perormance
 
Website speed
Website speedWebsite speed
Website speed
 
Ui perf
Ui perfUi perf
Ui perf
 
The need for Speed: Advanced #webperf - SEOday 2018
The need for Speed: Advanced #webperf - SEOday 2018The need for Speed: Advanced #webperf - SEOday 2018
The need for Speed: Advanced #webperf - SEOday 2018
 
Speed!
Speed!Speed!
Speed!
 
Web Speed And Scalability
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And Scalability
 
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP MeetupWeb Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
 
Frontend performance
Frontend performanceFrontend performance
Frontend performance
 
Php go vrooom!
Php go vrooom!Php go vrooom!
Php go vrooom!
 

Mais de Helgi Þormar Þorbjörnsson

Website releases made easy with the PEAR installer, OSCON 2009
Website releases made easy with the PEAR installer, OSCON 2009Website releases made easy with the PEAR installer, OSCON 2009
Website releases made easy with the PEAR installer, OSCON 2009
Helgi Þormar Þorbjörnsson
 
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Helgi Þormar Þorbjörnsson
 

Mais de Helgi Þormar Þorbjörnsson (14)

Phar, The PHP .exe Format
Phar, The PHP .exe FormatPhar, The PHP .exe Format
Phar, The PHP .exe Format
 
Distribute the workload, PHP Barcelona 2011
Distribute the workload, PHP Barcelona 2011Distribute the workload, PHP Barcelona 2011
Distribute the workload, PHP Barcelona 2011
 
Distribute the workload, PHPTek, Amsterdam, 2011
Distribute the workload, PHPTek, Amsterdam, 2011Distribute the workload, PHPTek, Amsterdam, 2011
Distribute the workload, PHPTek, Amsterdam, 2011
 
Frontend Caching, PHPTek 2011, Chicago
Frontend Caching, PHPTek 2011, ChicagoFrontend Caching, PHPTek 2011, Chicago
Frontend Caching, PHPTek 2011, Chicago
 
Scale like an ant, distribute the workload - DPC, Amsterdam, 2011
Scale like an ant, distribute the workload - DPC, Amsterdam,  2011Scale like an ant, distribute the workload - DPC, Amsterdam,  2011
Scale like an ant, distribute the workload - DPC, Amsterdam, 2011
 
Think like an ant, distribute the workload - PhpDay, Italy, 2011
Think like an ant, distribute the workload - PhpDay, Italy, 2011Think like an ant, distribute the workload - PhpDay, Italy, 2011
Think like an ant, distribute the workload - PhpDay, Italy, 2011
 
Frontend caching - PHP Day, Italy, 2011
Frontend caching - PHP Day, Italy, 2011Frontend caching - PHP Day, Italy, 2011
Frontend caching - PHP Day, Italy, 2011
 
Frontend caching
Frontend cachingFrontend caching
Frontend caching
 
Plant Pyrus in your system - A guide to a plugin system.
Plant Pyrus in your system - A guide to a plugin system.Plant Pyrus in your system - A guide to a plugin system.
Plant Pyrus in your system - A guide to a plugin system.
 
PEAR2 & Pyrus - The look ahead
PEAR2 & Pyrus - The look aheadPEAR2 & Pyrus - The look ahead
PEAR2 & Pyrus - The look ahead
 
Cashing For Cash, part 1 DPC 2009
Cashing For Cash, part 1 DPC 2009Cashing For Cash, part 1 DPC 2009
Cashing For Cash, part 1 DPC 2009
 
Website releases made easy with the PEAR installer, OSCON 2009
Website releases made easy with the PEAR installer, OSCON 2009Website releases made easy with the PEAR installer, OSCON 2009
Website releases made easy with the PEAR installer, OSCON 2009
 
Caching for Cash - Part 1
Caching for Cash - Part 1Caching for Cash - Part 1
Caching for Cash - Part 1
 
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
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
 
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...
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Caching for Cash, part 4 DPC 2009

Notas do Editor

  1. The user’s perception is more relevant than actual unload-to-onload response time. Definition of "user onload" is undefined or varies from one web page to the next.
  2. User needs to download all components Coming for the first time Force refresh of the site Browser automagically cleared the cache based on settings
  3. User needs to download all components Coming for the first time Force refresh of the site Browser automagically cleared the cache based on settings
  4. Yahoo ran the experiment. Ran against an empty page
  5. Older IE: 6 overall, 2 per host Older FF had 24 as overall and 8 per host Newer FF: 30 overall, 15 per host
  6. Many host names = more DNS lookups, adds delay Consider the effects of CPU thrashing for the client Lookup times vary across ISPs and geographic locations
  7. dynamically combine and cache Combine and minimize before a release
  8. Don't use HTMTL attributes to scale Favicon – keep it around, keep it small
  9. Hash like tag to compare browser cache against the server version Only download if hash has changed Gives more flexibility than last-modified date Great on a single server setup
  10. Typically unique to a server Default behavior in Apache and IIS If hash don't match between server, then browser cache is not used Proper Expires Headers won't help Remove ETags if not being used to its fullest