SlideShare a Scribd company logo
5  Critical WPO Techniques Guy Podjarny, CTO
Agenda Introduction Waterfalls charts WPO & Front-End Optimization 5 Critical Optimizations Domain Sharding Consolidation Inlining Predict Head Async JavaScript Execution Summary
Intro to Waterfall Charts – High Level 3 Timeline (Seconds) Individual Resource Requests
WebPageTest Waterfall - Legend 4 Detailed Breakdown of resource retrieval Helps identify bottlenecks and problems Page Load milestones “Standardized” points in time to measure against
Front-End vs. Back-End Performance Back-End: Time to get the HTML Front-End: Time after the HTML WPO= Back-End + Front-End Performance 5 Back-end Front-End
5 Critical Optimizations Front-End Optimization is complicated Many bottlenecks Many browsers Many techniques Moving Target We’ll discuss 5 key optimizations Explain the optimization Demonstrate its impact Share Tips & Tricks 6
Domain Sharding Problem: Too Few Hosts  Browsers limit connections per host Less requests are done in Parallel Solution: “Shard” a domain into sub-domains E.g. 1.blaze.io, 2.blaze.io, 3.blaze.io… All domains will get to the same place Browser sees different domains, opens more connections 7
Single Domain, IE7 2 connections per domain Total time ~8.5 seconds 8
Sharded Domain, IE7 2 connections per domain, 8 total Total time ~2.5 seconds 9
Single Domain, IE8 Problem mitigated by newer browsers Open more connections per domain Not fully resolved 10
Single Domain, iPhone 4.3 Problem repeats on iPhone/iPad 4 Connections per domain, 30 connections max 11
Single Domain, Android 2.3 But on Android, Domain Sharding is moot 4 connections per host, 4 connections max 12
Domain Sharding – Tips & Tricks Too many domains = long DNS Older axiom states 2 is best Our measurements show 3-5 works best Depends on number of resources on the site Always serve resources from the same shard Inconsistency will harm caching  Use different number of domains by browser Older browsers would benefit from more Android would benefit from no sharding 13
Consolidation Problem: Too many requests during page load Each request is a costly round-trip to the server Browsers limit number of concurrent requests Even more expensive on Mobile (asymmetric communication) Solution: Consolidate multiple files into one Single round-trip for multiple files Less round-trips, faster delivery Improved compression ratios 14
What can be consolidated? Textual Resources Stylesheets (CSS) JavaScript CSS Images Spriting Details: http://www.alistapart.com/articles/sprites Images and… anything else Data URIs 15 Google Sprite
Data URIs Textual Representation of data data:image/gif;base64,AAAA Supported in all latest browsers Includes IE8+, Chrome, Safari, Opera, Firefox Not supported in IE7 Supported in WebKit-based Mobile Browsers iPhone, Android, Blackberry 6, WinPho 7 16 prefix Encoding Data Content-type
JS & CSS Consolidation - Waterfall 17 www.cnn.com After:89 Requests Before:160 Requests
Consolidation – Tips & Tricks Ensure browsers support the technology Data URIs not supported on IE6 & IE7 Beware large blocking files On some browsers, CSS & JS files may block Making them larger may slow down the page JavaScript Complications Inline and external scripts may be co-dependent Document.write() makes scripts hard to move Some scripts are more “sensitive” than others… 18
Inlining Problems  Too many requests during page load Same problem Consolidation relates to Consolidated file take longer to fetch Increases page speed, but can slow down specific script Solution: Embed data into the parent  Embed scripts & images into web page Embed images into CSS files 19
Inlining & Consolidation - Comparison 20 www.cnn.com Before:160 Requests Both:57 Requests Consolidation:89 Requests
Inlining & Consolidation - Waterfall 21 Larger HTML Large CSS Dynamic Resources Generated in the browser Ads, Analytics, …
Inlining – Tips & Tricks Inlined resources are not cached Inlining best suited for landing pages Small resources can be inlined always Inlining overhead minor for small scripts Especially when compression is in use Don’t inline client-sensitive requests Analytics, beacons, ads… 22
Flushing the Buffer Early Problem It takes time to generate a full HTML page Inlining makes pages big and slow to download Solution Send back the document start earlier Document “Head” is often static and easy to generate Ensure CSS, JS and more are included in head Note: Dubbed “Predict Head” in Blaze After the feature that delivers it 23
Predict Head - Waterfall 24 Before:TTFB is 1.4 seconds,Doc Complete at 3.8 Seconds After: TTFB is 0.3 seconds,Doc Complete at 2.8 Seconds
Async JS Problem 3rd Party resources still load slowly Ads, Analytics, “Like” button, etc. Dynamically generated content slows page down Solution De-couple script execution from page load Most 3rd party tools are included as scripts Many 3rd party tools are secondary in page functionality 25
Async JS – Comparison 26 Before:Doc Complete at 2.8 Seconds After: Doc Complete at 1.5 Seconds
Async JS – Waterfall Similar Waterfall Earlier Doc Complete Ads loaded late Metrics loaded late Page functional faster 3rd party tools follow up quickly after 27
Async JS - Implementation Requires HTML & JavaScript Changes HTML: Modify script tags’ type to “text/myscript” Will make the browser skip them JavaScript: Add script to bottom of page to invoke the scripts Can use a 3rd party package, such as controljs(http://stevesouders.com/controljs/) 28
Async JS – Tips & Tricks Many pitfalls due to JavaScript flexibility Event registration, document.write(), etc. External scripts will be invoked serially Will slow down total time to execute scripts Can be improved with preloading scripts Requires cacheable scripts & browser-specific code Optionally only “Async” specific script Whitelist: Leave key scripts “in sync” with page Blacklist: Only “async” specific scripts 29
Summary 30 FEO Can do A Lot These 5 optimizations matter But many others exist Beware the pitfalls Don’t try it all at once.. Focus on select browsers Tackle key pages/sites Stay up-to-date Performance is a moving target 59 Requests (9 by Onload) 1.5 Seconds Measured using:4Mbps/500KbpsDownload/Upload 160 Requests 4.6 Seconds
Blaze Automated Front-End Optimization Blaze automates Front-End Optimization No Software, Hardware or Code Changes needed All the pitfalls and complexities taken care of Blaze applied the optimizations in these slides And can apply many other optimizations Submit your URL onblaze.io for your ownoptimization report 31
32 Questions? Contact us at contact@blaze.io Thank You!

More Related Content

What's hot

Tulsa tech fest 2010 - web speed and scalability
Tulsa tech fest 2010  - web speed and scalabilityTulsa tech fest 2010  - web speed and scalability
Tulsa tech fest 2010 - web speed and scalabilityJason Ragsdale
 
Building Hybrid data cluster using PostgreSQL and MongoDB
Building Hybrid data cluster using PostgreSQL and MongoDBBuilding Hybrid data cluster using PostgreSQL and MongoDB
Building Hybrid data cluster using PostgreSQL and MongoDBAshnikbiz
 
캐시 분산처리 인프라
캐시 분산처리 인프라캐시 분산처리 인프라
캐시 분산처리 인프라
Park Chunduck
 
Mongo db dhruba
Mongo db dhrubaMongo db dhruba
Mongo db dhruba
Dhrubaji Mandal ♛
 
Web Optimization Level: Paranoid
Web Optimization Level: ParanoidWeb Optimization Level: Paranoid
Web Optimization Level: Paranoid
robin_sy
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best Practices
Ratnesh kumar, CSM
 
Web performance Talk
Web performance TalkWeb performance Talk
Web performance Talk
Prasoon Agrawal
 
Website performance optimization QA
Website performance optimization QAWebsite performance optimization QA
Website performance optimization QADenis Dudaev
 
Building low latency java applications with ehcache
Building low latency java applications with ehcacheBuilding low latency java applications with ehcache
Building low latency java applications with ehcache
Chris Westin
 
MongoDB WiredTiger Internals
MongoDB WiredTiger InternalsMongoDB WiredTiger Internals
MongoDB WiredTiger Internals
Norberto Leite
 
Postgres connections at scale
Postgres connections at scalePostgres connections at scale
Postgres connections at scale
Mydbops
 
Php & web server performace
Php & web server performacePhp & web server performace
Php & web server performaceTuyển Đoàn
 
Building Lightning Fast Websites (for Twin Cities .NET User Group)
Building Lightning Fast Websites (for Twin Cities .NET User Group)Building Lightning Fast Websites (for Twin Cities .NET User Group)
Building Lightning Fast Websites (for Twin Cities .NET User Group)
strommen
 
Rest services caching
Rest services cachingRest services caching
Rest services caching
Sperasoft
 
SQL Server Integration Services Tips & Tricks
SQL Server Integration Services Tips & TricksSQL Server Integration Services Tips & Tricks
SQL Server Integration Services Tips & TricksGuillermo Caicedo
 
Storage talk
Storage talkStorage talk
Storage talkchristkv
 
Web performance mercadolibre - ECI 2013
Web performance   mercadolibre - ECI 2013Web performance   mercadolibre - ECI 2013
Web performance mercadolibre - ECI 2013
Santiago Aimetta
 
Optimizing Your Frontend Performance
Optimizing Your Frontend PerformanceOptimizing Your Frontend Performance
Optimizing Your Frontend PerformanceThomas Weinert
 
Level Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformanceLevel Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress Performance
Pantheon
 
Caching in Drupal 8
Caching in Drupal 8Caching in Drupal 8
Caching in Drupal 8
valuebound
 

What's hot (20)

Tulsa tech fest 2010 - web speed and scalability
Tulsa tech fest 2010  - web speed and scalabilityTulsa tech fest 2010  - web speed and scalability
Tulsa tech fest 2010 - web speed and scalability
 
Building Hybrid data cluster using PostgreSQL and MongoDB
Building Hybrid data cluster using PostgreSQL and MongoDBBuilding Hybrid data cluster using PostgreSQL and MongoDB
Building Hybrid data cluster using PostgreSQL and MongoDB
 
캐시 분산처리 인프라
캐시 분산처리 인프라캐시 분산처리 인프라
캐시 분산처리 인프라
 
Mongo db dhruba
Mongo db dhrubaMongo db dhruba
Mongo db dhruba
 
Web Optimization Level: Paranoid
Web Optimization Level: ParanoidWeb Optimization Level: Paranoid
Web Optimization Level: Paranoid
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best Practices
 
Web performance Talk
Web performance TalkWeb performance Talk
Web performance Talk
 
Website performance optimization QA
Website performance optimization QAWebsite performance optimization QA
Website performance optimization QA
 
Building low latency java applications with ehcache
Building low latency java applications with ehcacheBuilding low latency java applications with ehcache
Building low latency java applications with ehcache
 
MongoDB WiredTiger Internals
MongoDB WiredTiger InternalsMongoDB WiredTiger Internals
MongoDB WiredTiger Internals
 
Postgres connections at scale
Postgres connections at scalePostgres connections at scale
Postgres connections at scale
 
Php & web server performace
Php & web server performacePhp & web server performace
Php & web server performace
 
Building Lightning Fast Websites (for Twin Cities .NET User Group)
Building Lightning Fast Websites (for Twin Cities .NET User Group)Building Lightning Fast Websites (for Twin Cities .NET User Group)
Building Lightning Fast Websites (for Twin Cities .NET User Group)
 
Rest services caching
Rest services cachingRest services caching
Rest services caching
 
SQL Server Integration Services Tips & Tricks
SQL Server Integration Services Tips & TricksSQL Server Integration Services Tips & Tricks
SQL Server Integration Services Tips & Tricks
 
Storage talk
Storage talkStorage talk
Storage talk
 
Web performance mercadolibre - ECI 2013
Web performance   mercadolibre - ECI 2013Web performance   mercadolibre - ECI 2013
Web performance mercadolibre - ECI 2013
 
Optimizing Your Frontend Performance
Optimizing Your Frontend PerformanceOptimizing Your Frontend Performance
Optimizing Your Frontend Performance
 
Level Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformanceLevel Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress Performance
 
Caching in Drupal 8
Caching in Drupal 8Caching in Drupal 8
Caching in Drupal 8
 

Viewers also liked

Accelerating Nginx Web Server Performance
Accelerating Nginx Web Server PerformanceAccelerating Nginx Web Server Performance
Accelerating Nginx Web Server Performance
Bruce Tolley
 
Running PHP on Nginx / PHP wgtn
Running PHP on Nginx / PHP wgtnRunning PHP on Nginx / PHP wgtn
Running PHP on Nginx / PHP wgtn
Harald Zeitlhofer
 
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
Jonathan Klein
 
Webpage Caches - the big picture (WordPress too)
Webpage Caches - the big picture (WordPress too)Webpage Caches - the big picture (WordPress too)
Webpage Caches - the big picture (WordPress too)
Erich
 
Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012
Wim Godden
 
High Performance Php My Sql Scaling Techniques
High Performance Php My Sql Scaling TechniquesHigh Performance Php My Sql Scaling Techniques
High Performance Php My Sql Scaling Techniques
ZendCon
 
Maximizing PHP Performance with NGINX
Maximizing PHP Performance with NGINXMaximizing PHP Performance with NGINX
Maximizing PHP Performance with NGINX
NGINX, Inc.
 
Nginx Scripting - Extending Nginx Functionalities with Lua
Nginx Scripting - Extending Nginx Functionalities with LuaNginx Scripting - Extending Nginx Functionalities with Lua
Nginx Scripting - Extending Nginx Functionalities with LuaTony Fabeen
 
How to secure your web applications with NGINX
How to secure your web applications with NGINXHow to secure your web applications with NGINX
How to secure your web applications with NGINX
Wallarm
 
How to monitor NGINX
How to monitor NGINXHow to monitor NGINX
How to monitor NGINX
Server Density
 
How to be Successful with Responsive Sites (Koombea & NGINX) - English
How to be Successful with Responsive Sites (Koombea & NGINX) - EnglishHow to be Successful with Responsive Sites (Koombea & NGINX) - English
How to be Successful with Responsive Sites (Koombea & NGINX) - English
Koombea
 
Load Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINXLoad Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINX
NGINX, Inc.
 
Swift for back end: A new generation of full stack languages?
Swift for back end: A new generation of full stack languages?Swift for back end: A new generation of full stack languages?
Swift for back end: A new generation of full stack languages?
Koombea
 
The 3 Models in the NGINX Microservices Reference Architecture
The 3 Models in the NGINX Microservices Reference ArchitectureThe 3 Models in the NGINX Microservices Reference Architecture
The 3 Models in the NGINX Microservices Reference Architecture
NGINX, Inc.
 
NGINX High-performance Caching
NGINX High-performance CachingNGINX High-performance Caching
NGINX High-performance Caching
NGINX, Inc.
 
Web page load speed optimization
Web page load speed optimizationWeb page load speed optimization
Web page load speed optimizationDmitry Dudin
 
Nginx Internals
Nginx InternalsNginx Internals
Nginx Internals
Joshua Zhu
 

Viewers also liked (18)

Accelerating Nginx Web Server Performance
Accelerating Nginx Web Server PerformanceAccelerating Nginx Web Server Performance
Accelerating Nginx Web Server Performance
 
Running PHP on Nginx / PHP wgtn
Running PHP on Nginx / PHP wgtnRunning PHP on Nginx / PHP wgtn
Running PHP on Nginx / PHP wgtn
 
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
 
Webpage Caches - the big picture (WordPress too)
Webpage Caches - the big picture (WordPress too)Webpage Caches - the big picture (WordPress too)
Webpage Caches - the big picture (WordPress too)
 
Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012
 
High Performance Php My Sql Scaling Techniques
High Performance Php My Sql Scaling TechniquesHigh Performance Php My Sql Scaling Techniques
High Performance Php My Sql Scaling Techniques
 
Maximizing PHP Performance with NGINX
Maximizing PHP Performance with NGINXMaximizing PHP Performance with NGINX
Maximizing PHP Performance with NGINX
 
Nginx Scripting - Extending Nginx Functionalities with Lua
Nginx Scripting - Extending Nginx Functionalities with LuaNginx Scripting - Extending Nginx Functionalities with Lua
Nginx Scripting - Extending Nginx Functionalities with Lua
 
Nginx pres
Nginx presNginx pres
Nginx pres
 
How to secure your web applications with NGINX
How to secure your web applications with NGINXHow to secure your web applications with NGINX
How to secure your web applications with NGINX
 
How to monitor NGINX
How to monitor NGINXHow to monitor NGINX
How to monitor NGINX
 
How to be Successful with Responsive Sites (Koombea & NGINX) - English
How to be Successful with Responsive Sites (Koombea & NGINX) - EnglishHow to be Successful with Responsive Sites (Koombea & NGINX) - English
How to be Successful with Responsive Sites (Koombea & NGINX) - English
 
Load Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINXLoad Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINX
 
Swift for back end: A new generation of full stack languages?
Swift for back end: A new generation of full stack languages?Swift for back end: A new generation of full stack languages?
Swift for back end: A new generation of full stack languages?
 
The 3 Models in the NGINX Microservices Reference Architecture
The 3 Models in the NGINX Microservices Reference ArchitectureThe 3 Models in the NGINX Microservices Reference Architecture
The 3 Models in the NGINX Microservices Reference Architecture
 
NGINX High-performance Caching
NGINX High-performance CachingNGINX High-performance Caching
NGINX High-performance Caching
 
Web page load speed optimization
Web page load speed optimizationWeb page load speed optimization
Web page load speed optimization
 
Nginx Internals
Nginx InternalsNginx Internals
Nginx Internals
 

Similar to 5 critical-optimizations.v2

High-Speed HTML5
High-Speed HTML5High-Speed HTML5
High-Speed HTML5
Peter Lubbers
 
Scaling 101
Scaling 101Scaling 101
Scaling 101
Chris Finne
 
Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster WebsiteRayed Alrashed
 
Front-end performances
Front-end performancesFront-end performances
Front-end performances
Smile I.T is open
 
Web Client Performance
Web Client PerformanceWeb Client Performance
Web Client PerformanceHerea Adrian
 
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
PINT Inc
 
The Need For Speed
The Need For SpeedThe Need For Speed
The Need For SpeedAndy Davies
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizing
Ashok Modi
 
3 Hacks to Improve WordPress Performance
3 Hacks to Improve WordPress Performance3 Hacks to Improve WordPress Performance
3 Hacks to Improve WordPress Performance
RF Studio
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
Siarhei Barysiuk
 
AJAX for Scalability
AJAX for ScalabilityAJAX for Scalability
AJAX for ScalabilityTuenti
 
Ajax For Scalability
Ajax For ScalabilityAjax For Scalability
Ajax For Scalability
erikschultink
 
Client Side Performance @ Xero
Client Side Performance @ XeroClient Side Performance @ Xero
Client Side Performance @ Xero
Craig Walker
 
Fundamentals of web_design_v2
Fundamentals of web_design_v2Fundamentals of web_design_v2
Fundamentals of web_design_v2
hussain534
 
Frontend performance
Frontend performanceFrontend performance
Frontend performance
sacred 8
 
High Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesHigh Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesStoyan Stefanov
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speed
Promet Source
 
WordCamp Denmark Keynote
WordCamp Denmark KeynoteWordCamp Denmark Keynote
WordCamp Denmark Keynote
Frederick Townes
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speed
Andy Kucharski
 

Similar to 5 critical-optimizations.v2 (20)

High-Speed HTML5
High-Speed HTML5High-Speed HTML5
High-Speed HTML5
 
Scaling 101 test
Scaling 101 testScaling 101 test
Scaling 101 test
 
Scaling 101
Scaling 101Scaling 101
Scaling 101
 
Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster Website
 
Front-end performances
Front-end performancesFront-end performances
Front-end performances
 
Web Client Performance
Web Client PerformanceWeb Client Performance
Web Client Performance
 
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
 
The Need For Speed
The Need For SpeedThe Need For Speed
The Need For Speed
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizing
 
3 Hacks to Improve WordPress Performance
3 Hacks to Improve WordPress Performance3 Hacks to Improve WordPress Performance
3 Hacks to Improve WordPress Performance
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
AJAX for Scalability
AJAX for ScalabilityAJAX for Scalability
AJAX for Scalability
 
Ajax For Scalability
Ajax For ScalabilityAjax For Scalability
Ajax For Scalability
 
Client Side Performance @ Xero
Client Side Performance @ XeroClient Side Performance @ Xero
Client Side Performance @ Xero
 
Fundamentals of web_design_v2
Fundamentals of web_design_v2Fundamentals of web_design_v2
Fundamentals of web_design_v2
 
Frontend performance
Frontend performanceFrontend performance
Frontend performance
 
High Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesHigh Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practices
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speed
 
WordCamp Denmark Keynote
WordCamp Denmark KeynoteWordCamp Denmark Keynote
WordCamp Denmark Keynote
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speed
 

Recently uploaded

AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 

Recently uploaded (20)

AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 

5 critical-optimizations.v2

  • 1. 5 Critical WPO Techniques Guy Podjarny, CTO
  • 2. Agenda Introduction Waterfalls charts WPO & Front-End Optimization 5 Critical Optimizations Domain Sharding Consolidation Inlining Predict Head Async JavaScript Execution Summary
  • 3. Intro to Waterfall Charts – High Level 3 Timeline (Seconds) Individual Resource Requests
  • 4. WebPageTest Waterfall - Legend 4 Detailed Breakdown of resource retrieval Helps identify bottlenecks and problems Page Load milestones “Standardized” points in time to measure against
  • 5. Front-End vs. Back-End Performance Back-End: Time to get the HTML Front-End: Time after the HTML WPO= Back-End + Front-End Performance 5 Back-end Front-End
  • 6. 5 Critical Optimizations Front-End Optimization is complicated Many bottlenecks Many browsers Many techniques Moving Target We’ll discuss 5 key optimizations Explain the optimization Demonstrate its impact Share Tips & Tricks 6
  • 7. Domain Sharding Problem: Too Few Hosts Browsers limit connections per host Less requests are done in Parallel Solution: “Shard” a domain into sub-domains E.g. 1.blaze.io, 2.blaze.io, 3.blaze.io… All domains will get to the same place Browser sees different domains, opens more connections 7
  • 8. Single Domain, IE7 2 connections per domain Total time ~8.5 seconds 8
  • 9. Sharded Domain, IE7 2 connections per domain, 8 total Total time ~2.5 seconds 9
  • 10. Single Domain, IE8 Problem mitigated by newer browsers Open more connections per domain Not fully resolved 10
  • 11. Single Domain, iPhone 4.3 Problem repeats on iPhone/iPad 4 Connections per domain, 30 connections max 11
  • 12. Single Domain, Android 2.3 But on Android, Domain Sharding is moot 4 connections per host, 4 connections max 12
  • 13. Domain Sharding – Tips & Tricks Too many domains = long DNS Older axiom states 2 is best Our measurements show 3-5 works best Depends on number of resources on the site Always serve resources from the same shard Inconsistency will harm caching Use different number of domains by browser Older browsers would benefit from more Android would benefit from no sharding 13
  • 14. Consolidation Problem: Too many requests during page load Each request is a costly round-trip to the server Browsers limit number of concurrent requests Even more expensive on Mobile (asymmetric communication) Solution: Consolidate multiple files into one Single round-trip for multiple files Less round-trips, faster delivery Improved compression ratios 14
  • 15. What can be consolidated? Textual Resources Stylesheets (CSS) JavaScript CSS Images Spriting Details: http://www.alistapart.com/articles/sprites Images and… anything else Data URIs 15 Google Sprite
  • 16. Data URIs Textual Representation of data data:image/gif;base64,AAAA Supported in all latest browsers Includes IE8+, Chrome, Safari, Opera, Firefox Not supported in IE7 Supported in WebKit-based Mobile Browsers iPhone, Android, Blackberry 6, WinPho 7 16 prefix Encoding Data Content-type
  • 17. JS & CSS Consolidation - Waterfall 17 www.cnn.com After:89 Requests Before:160 Requests
  • 18. Consolidation – Tips & Tricks Ensure browsers support the technology Data URIs not supported on IE6 & IE7 Beware large blocking files On some browsers, CSS & JS files may block Making them larger may slow down the page JavaScript Complications Inline and external scripts may be co-dependent Document.write() makes scripts hard to move Some scripts are more “sensitive” than others… 18
  • 19. Inlining Problems Too many requests during page load Same problem Consolidation relates to Consolidated file take longer to fetch Increases page speed, but can slow down specific script Solution: Embed data into the parent Embed scripts & images into web page Embed images into CSS files 19
  • 20. Inlining & Consolidation - Comparison 20 www.cnn.com Before:160 Requests Both:57 Requests Consolidation:89 Requests
  • 21. Inlining & Consolidation - Waterfall 21 Larger HTML Large CSS Dynamic Resources Generated in the browser Ads, Analytics, …
  • 22. Inlining – Tips & Tricks Inlined resources are not cached Inlining best suited for landing pages Small resources can be inlined always Inlining overhead minor for small scripts Especially when compression is in use Don’t inline client-sensitive requests Analytics, beacons, ads… 22
  • 23. Flushing the Buffer Early Problem It takes time to generate a full HTML page Inlining makes pages big and slow to download Solution Send back the document start earlier Document “Head” is often static and easy to generate Ensure CSS, JS and more are included in head Note: Dubbed “Predict Head” in Blaze After the feature that delivers it 23
  • 24. Predict Head - Waterfall 24 Before:TTFB is 1.4 seconds,Doc Complete at 3.8 Seconds After: TTFB is 0.3 seconds,Doc Complete at 2.8 Seconds
  • 25. Async JS Problem 3rd Party resources still load slowly Ads, Analytics, “Like” button, etc. Dynamically generated content slows page down Solution De-couple script execution from page load Most 3rd party tools are included as scripts Many 3rd party tools are secondary in page functionality 25
  • 26. Async JS – Comparison 26 Before:Doc Complete at 2.8 Seconds After: Doc Complete at 1.5 Seconds
  • 27. Async JS – Waterfall Similar Waterfall Earlier Doc Complete Ads loaded late Metrics loaded late Page functional faster 3rd party tools follow up quickly after 27
  • 28. Async JS - Implementation Requires HTML & JavaScript Changes HTML: Modify script tags’ type to “text/myscript” Will make the browser skip them JavaScript: Add script to bottom of page to invoke the scripts Can use a 3rd party package, such as controljs(http://stevesouders.com/controljs/) 28
  • 29. Async JS – Tips & Tricks Many pitfalls due to JavaScript flexibility Event registration, document.write(), etc. External scripts will be invoked serially Will slow down total time to execute scripts Can be improved with preloading scripts Requires cacheable scripts & browser-specific code Optionally only “Async” specific script Whitelist: Leave key scripts “in sync” with page Blacklist: Only “async” specific scripts 29
  • 30. Summary 30 FEO Can do A Lot These 5 optimizations matter But many others exist Beware the pitfalls Don’t try it all at once.. Focus on select browsers Tackle key pages/sites Stay up-to-date Performance is a moving target 59 Requests (9 by Onload) 1.5 Seconds Measured using:4Mbps/500KbpsDownload/Upload 160 Requests 4.6 Seconds
  • 31. Blaze Automated Front-End Optimization Blaze automates Front-End Optimization No Software, Hardware or Code Changes needed All the pitfalls and complexities taken care of Blaze applied the optimizations in these slides And can apply many other optimizations Submit your URL onblaze.io for your ownoptimization report 31
  • 32. 32 Questions? Contact us at contact@blaze.io Thank You!