SlideShare a Scribd company logo
Performance Matters Exploring Optimizing Magento Page Loads Thomas Powell Joe Lima [email_address] [email_address]
Punchline First Speed effects outcomes online Magento can be accelerated using common Web optimization techniques including: Gzip Compression Reverse Proxy Cache Cache Control JavaScript Optimizations Request Reduction CDNs
Speed is Not Optional “ First and foremost, we believe that speed is more than a feature.  Speed is the most important feature.  If your application is slow, people won ’ t use it. ” Fred Wilson, Well known Internet VC Source: 10 Golden Principles of Successful Web Apps http://thinkvitamin.com/web-apps/fred-wilsons-10-golden-principles-of-successful-web-apps/
Many Stats Support This
We Must be Faster! The floor is ~1 second Don ’ t buy into the broadband fallacy Human nature will prove you wrong … as will latency Given 99% rule of usability you are being compared against Google, Amazon, etc. whether you like it or not
Why Slow? 3 fundamental reasons – from most to least controllable Server Network Client
Our Golden Rules Do less, less often Send less, less often Keep your clients close
Hardware & Bandwith Doesn ’ t Cure  ‘ Slowitis ’ More hardware will help address page generation times but little else Bandwidth is only one part of your delivery challenge Effective throughput on average for the Web is only around 5mbps Note both are essential for scaling!
Speeding Up Magento Admittedly Magento doesn ’ t have a glowing reputation for speed in the community Realistically though few apps/sites do, especially if they are feature rich General Trade-off – more features, flexibility usually equals less speed
Stock Community Edition
Stock Enterprise Edition
Front-end Focus “ Five years ago most of the attention on web performance was focused on the backend.  Since then we ’ ve learned that 80% of the time users wait for a web page to load is the responsibility of the frontend. ” -Steve Souders, Google Head Performance Engineer and Author of  “ High Performance Web Sites ” “ 97% of mobile end-user response time happens at front-end”    - Joshua Bixby, President of Strange Loop Networks
Let ’ s Start Optimizing
Gzip Compression HTML, CSS, JS compression Widely supported Significant speed up for long latency connections Approach 1 – Server Level – mod_deflate Approach 2 – PHP Level Hosting issues only legit reason to do there
Simple Configuration Often installed but not enabled
Gzip On
TTFB Too Long Time to first byte being so long is an indication, in our control environment, of long server side generation times If this has already been addressed, and then shows up in the production environment, it is typically an indication of a capacity problem
Addressing Page Build Times APC – Alternative PHP Cache Avoid interpret time and cache opcode for second fetch run improvement http://magebase.com/magento-tutorials/speeding-up-magento-with-apc-or-memcached/
After APC
Page Caching TTFB is still pretty long Consider the issue of static dynamics Is content changing or not? If not, cache it! Varnish Cache  www.varnish-cache.org Magento-varnish  https://github.com/madalinoprea/magneto-varnish
After Varnish You will have a delay on first request to prime the cache, but afterwards…
Too Many Requests Too many HTTP requests can really slow a page down.
CSS and JS Bundling Easy to fix CSS and JS issues in Magento
Minification Don ’ t just bundle  “ crunch ”  your CSS and JavaScript (and HTML!) Focus most on JavaScript because of byte count and parse time http://code.google.com/p/minify http://code.google.com/closure/compiler http://marijnhaverbeke.nl/uglifyjs
JS Blocking! Non-deferred JS will block browser execution Simple solution: move code to the bottom Better solution: load order manager
Render Time after Shifting JS Magento Pitfall – Inline Script Execution
Image Issues Images are not optimized well Fix with jpegmini.com, smush.it, Photoshop, etc.
Image Optimization There are just too many image requests
CSS Sprites Bundle images into single (or small number of images) Then use CSS rules to show just the portion of the sprite file at a particular point in the page
Sprite Result Sub 2s render! We went a little overboard though
Repeat View Set cache control headers (Expires, Max-Age, etc.) so browser and proxies aren ’ t guessing about caching For Apache use mod_headers and mod_expires Set static object expiration far in future and change object name if updated Don ’ t cache  “ base ”  resource long term Note lots of user cache flushing
Getting Close
Big Problem - Distance Point source hosting you can ’ t be close to everyone and distance matters http://assets.en.oreilly.com/1/event/44/TCP%20and%20the%20Lower%20Bound%20of%20Web%20Performance%20Presentation.pdf
Kiwis don’t enjoy our store
Bandwidth doesn ’ t matter (much) http://www.belshe.com/2010/05/24/more-bandwidth-doesnt-matter-much/
Round Trips Matter Lower round-trip time = Better page load time
Content Distribution Networks CDNs reduce latency by moving large static assets closer to end users Amazon Cloudfront, MaxCDN, etc. Considerations Cost Sharded domain name – images.yoursite.com Might want this for SSL traffic as well! JS on CDN can have some origin issues
All As!
Google still wins!
Always More 3 rd  party components are killing performance – think before you slap that script in  JS optimization (lazy load, microlibs, etc.) Prefetching and pre-rendering tricks Really should track end user performance with deliver & render analytics Of course no matter how fancy you get this does only address single request which improves scale but doesn't ’ t solve it!
How to do all or most of this? Hand optimize as we did-server, Magento config & template changes Software add-on(s) like Nitrogento An appliance like StangeLoop Site Optimizer ( www.strangeloopnetworks.com ) or smart load balancer A proxy service like  www.cloudfare.com
Example: Nitrogento
Nitrogento Result
Wrap Up Thanks for listening! Now on  to your questions either now or later Thomas Powell ( [email_address] )  &   Joe Lima ( [email_address] )   +1 858.270.2086   www.pint.com   [email_address]   @PINTSD

More Related Content

PDF
Magento Optimization Whitepaper
PPTX
Phpworld.2015 scaling magento
PDF
Magento Performance Optimization 101
PDF
Magento performance & optimisation best practices
PDF
WPblog's Ultimate WordPress Guide to Boost Your Website Performance
PDF
Keep the Web Fast
PDF
Client-side Web Performance Optimization [paper]
PDF
Optimizing web performance (Fronteers edition)
Magento Optimization Whitepaper
Phpworld.2015 scaling magento
Magento Performance Optimization 101
Magento performance & optimisation best practices
WPblog's Ultimate WordPress Guide to Boost Your Website Performance
Keep the Web Fast
Client-side Web Performance Optimization [paper]
Optimizing web performance (Fronteers edition)

What's hot (20)

PPTX
Web Performance Optimization
PDF
Speed Up Wordpress, Wordpress Horsepower
PDF
Measuring Web Performance
PDF
Web Unleashed '19 - Measuring the Adoption of Web Performance Techniques
PDF
Web Client Performance
PDF
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
PPTX
How webpage loading takes place?
PDF
Wordpress horsepower
PPTX
London Web Performance Meetup: Performance for mortal companies
PDF
WebPagetest Power Users - Velocity 2014
PDF
Improving frontend performance
PDF
Walmart pagespeed-slide
PPTX
Caching 101
PPTX
How to Speed up your Website
PPTX
Web Performance Internals explained for Developers and other stake holders.
PPTX
Performace optimization (increase website speed)
PPTX
Web performance optimization (WPO)
PPTX
Presentation1
PPT
Hands on performance testing and analysis with web pagetest
PDF
WordCamp RVA 2011 - Performance & Tuning
Web Performance Optimization
Speed Up Wordpress, Wordpress Horsepower
Measuring Web Performance
Web Unleashed '19 - Measuring the Adoption of Web Performance Techniques
Web Client Performance
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
How webpage loading takes place?
Wordpress horsepower
London Web Performance Meetup: Performance for mortal companies
WebPagetest Power Users - Velocity 2014
Improving frontend performance
Walmart pagespeed-slide
Caching 101
How to Speed up your Website
Web Performance Internals explained for Developers and other stake holders.
Performace optimization (increase website speed)
Web performance optimization (WPO)
Presentation1
Hands on performance testing and analysis with web pagetest
WordCamp RVA 2011 - Performance & Tuning
Ad

Similar to Magento Performance Improvements with Client Side Optimizations (20)

PPTX
The Importance of Site Performance and Simple Steps to Achieve It
PPTX
Mage uk-2013-1345-chris-wells-131030120920-phpapp01
DOCX
How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...
PDF
How to optimize your Magento store
PPTX
Website Performance
PPTX
OpenXcell - Magento Optimization Webinar 2013
PPTX
Openxcell conducts a successful webinar on Magento Optimization
PPSX
Magento performancenbs
PPTX
MagentoLive Australia 2014 - The Importance of Performance & Security and Sim...
PPTX
Magento Live UK Nexcess Performance & Security Session
PPTX
10 things you can do to speed up your web app today stir trek edition
PPT
Oracle UCM: Web Site Performance Tuning
PPTX
Breaking the Speed Limit: Faster Websites Win
PDF
The Need for Speed (5 Performance Optimization Tipps) - brightonSEO 2014
PPTX
Improving Performance on Magento 1*
PPTX
Time is the enemy
PDF
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
PDF
Magento e commerce performance optimization
PPTX
Magento for-performance- v01
PPTX
What is my ecommerce website missing?
The Importance of Site Performance and Simple Steps to Achieve It
Mage uk-2013-1345-chris-wells-131030120920-phpapp01
How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...
How to optimize your Magento store
Website Performance
OpenXcell - Magento Optimization Webinar 2013
Openxcell conducts a successful webinar on Magento Optimization
Magento performancenbs
MagentoLive Australia 2014 - The Importance of Performance & Security and Sim...
Magento Live UK Nexcess Performance & Security Session
10 things you can do to speed up your web app today stir trek edition
Oracle UCM: Web Site Performance Tuning
Breaking the Speed Limit: Faster Websites Win
The Need for Speed (5 Performance Optimization Tipps) - brightonSEO 2014
Improving Performance on Magento 1*
Time is the enemy
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
Magento e commerce performance optimization
Magento for-performance- v01
What is my ecommerce website missing?
Ad

Recently uploaded (20)

PDF
Machine learning based COVID-19 study performance prediction
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Electronic commerce courselecture one. Pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Big Data Technologies - Introduction.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Encapsulation theory and applications.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
MYSQL Presentation for SQL database connectivity
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Machine learning based COVID-19 study performance prediction
Diabetes mellitus diagnosis method based random forest with bat algorithm
Building Integrated photovoltaic BIPV_UPV.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Electronic commerce courselecture one. Pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Big Data Technologies - Introduction.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
NewMind AI Monthly Chronicles - July 2025
Encapsulation theory and applications.pdf
Network Security Unit 5.pdf for BCA BBA.
MYSQL Presentation for SQL database connectivity
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Mobile App Security Testing_ A Comprehensive Guide.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
Understanding_Digital_Forensics_Presentation.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication

Magento Performance Improvements with Client Side Optimizations

  • 1. Performance Matters Exploring Optimizing Magento Page Loads Thomas Powell Joe Lima [email_address] [email_address]
  • 2. Punchline First Speed effects outcomes online Magento can be accelerated using common Web optimization techniques including: Gzip Compression Reverse Proxy Cache Cache Control JavaScript Optimizations Request Reduction CDNs
  • 3. Speed is Not Optional “ First and foremost, we believe that speed is more than a feature. Speed is the most important feature. If your application is slow, people won ’ t use it. ” Fred Wilson, Well known Internet VC Source: 10 Golden Principles of Successful Web Apps http://thinkvitamin.com/web-apps/fred-wilsons-10-golden-principles-of-successful-web-apps/
  • 5. We Must be Faster! The floor is ~1 second Don ’ t buy into the broadband fallacy Human nature will prove you wrong … as will latency Given 99% rule of usability you are being compared against Google, Amazon, etc. whether you like it or not
  • 6. Why Slow? 3 fundamental reasons – from most to least controllable Server Network Client
  • 7. Our Golden Rules Do less, less often Send less, less often Keep your clients close
  • 8. Hardware & Bandwith Doesn ’ t Cure ‘ Slowitis ’ More hardware will help address page generation times but little else Bandwidth is only one part of your delivery challenge Effective throughput on average for the Web is only around 5mbps Note both are essential for scaling!
  • 9. Speeding Up Magento Admittedly Magento doesn ’ t have a glowing reputation for speed in the community Realistically though few apps/sites do, especially if they are feature rich General Trade-off – more features, flexibility usually equals less speed
  • 12. Front-end Focus “ Five years ago most of the attention on web performance was focused on the backend. Since then we ’ ve learned that 80% of the time users wait for a web page to load is the responsibility of the frontend. ” -Steve Souders, Google Head Performance Engineer and Author of “ High Performance Web Sites ” “ 97% of mobile end-user response time happens at front-end” - Joshua Bixby, President of Strange Loop Networks
  • 13. Let ’ s Start Optimizing
  • 14. Gzip Compression HTML, CSS, JS compression Widely supported Significant speed up for long latency connections Approach 1 – Server Level – mod_deflate Approach 2 – PHP Level Hosting issues only legit reason to do there
  • 15. Simple Configuration Often installed but not enabled
  • 17. TTFB Too Long Time to first byte being so long is an indication, in our control environment, of long server side generation times If this has already been addressed, and then shows up in the production environment, it is typically an indication of a capacity problem
  • 18. Addressing Page Build Times APC – Alternative PHP Cache Avoid interpret time and cache opcode for second fetch run improvement http://magebase.com/magento-tutorials/speeding-up-magento-with-apc-or-memcached/
  • 20. Page Caching TTFB is still pretty long Consider the issue of static dynamics Is content changing or not? If not, cache it! Varnish Cache www.varnish-cache.org Magento-varnish https://github.com/madalinoprea/magneto-varnish
  • 21. After Varnish You will have a delay on first request to prime the cache, but afterwards…
  • 22. Too Many Requests Too many HTTP requests can really slow a page down.
  • 23. CSS and JS Bundling Easy to fix CSS and JS issues in Magento
  • 24. Minification Don ’ t just bundle “ crunch ” your CSS and JavaScript (and HTML!) Focus most on JavaScript because of byte count and parse time http://code.google.com/p/minify http://code.google.com/closure/compiler http://marijnhaverbeke.nl/uglifyjs
  • 25. JS Blocking! Non-deferred JS will block browser execution Simple solution: move code to the bottom Better solution: load order manager
  • 26. Render Time after Shifting JS Magento Pitfall – Inline Script Execution
  • 27. Image Issues Images are not optimized well Fix with jpegmini.com, smush.it, Photoshop, etc.
  • 28. Image Optimization There are just too many image requests
  • 29. CSS Sprites Bundle images into single (or small number of images) Then use CSS rules to show just the portion of the sprite file at a particular point in the page
  • 30. Sprite Result Sub 2s render! We went a little overboard though
  • 31. Repeat View Set cache control headers (Expires, Max-Age, etc.) so browser and proxies aren ’ t guessing about caching For Apache use mod_headers and mod_expires Set static object expiration far in future and change object name if updated Don ’ t cache “ base ” resource long term Note lots of user cache flushing
  • 33. Big Problem - Distance Point source hosting you can ’ t be close to everyone and distance matters http://assets.en.oreilly.com/1/event/44/TCP%20and%20the%20Lower%20Bound%20of%20Web%20Performance%20Presentation.pdf
  • 34. Kiwis don’t enjoy our store
  • 35. Bandwidth doesn ’ t matter (much) http://www.belshe.com/2010/05/24/more-bandwidth-doesnt-matter-much/
  • 36. Round Trips Matter Lower round-trip time = Better page load time
  • 37. Content Distribution Networks CDNs reduce latency by moving large static assets closer to end users Amazon Cloudfront, MaxCDN, etc. Considerations Cost Sharded domain name – images.yoursite.com Might want this for SSL traffic as well! JS on CDN can have some origin issues
  • 40. Always More 3 rd party components are killing performance – think before you slap that script in JS optimization (lazy load, microlibs, etc.) Prefetching and pre-rendering tricks Really should track end user performance with deliver & render analytics Of course no matter how fancy you get this does only address single request which improves scale but doesn't ’ t solve it!
  • 41. How to do all or most of this? Hand optimize as we did-server, Magento config & template changes Software add-on(s) like Nitrogento An appliance like StangeLoop Site Optimizer ( www.strangeloopnetworks.com ) or smart load balancer A proxy service like www.cloudfare.com
  • 44. Wrap Up Thanks for listening! Now on to your questions either now or later Thomas Powell ( [email_address] ) & Joe Lima ( [email_address] ) +1 858.270.2086 www.pint.com [email_address] @PINTSD

Editor's Notes

  • #9: We were thinking arthritis here, stupid word but maybe you’ll remember this point
  • #13: http://www.webperformancetoday.com/2011/04/20/desktop-vs-mobile-web-page-load-speed/
  • #31: Beware the over spriting problem…it is possible to block yourself with CSS here and avoid incremental loading you get with individual images which might be trouble for long latency requests or mobile devices
  • #44: It couldn’t quite externalize the CSS images automatically, still the performance is a great improvement. This is the common trade off of automated versus by hand approaches…if every 100ms matters you might find it worth it pay to customize