SlideShare a Scribd company logo
1 of 32
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
 
Web Optimization Level: Paranoid
Web Optimization Level: ParanoidWeb Optimization Level: Paranoid
Web Optimization Level: Paranoidrobin_sy
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best PracticesRatnesh kumar, CSM
 
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 ehcacheChris Westin
 
MongoDB WiredTiger Internals
MongoDB WiredTiger InternalsMongoDB WiredTiger Internals
MongoDB WiredTiger InternalsNorberto Leite
 
Postgres connections at scale
Postgres connections at scalePostgres connections at scale
Postgres connections at scaleMydbops
 
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 cachingSperasoft
 
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 2013Santiago 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 PerformancePantheon
 
Caching in Drupal 8
Caching in Drupal 8Caching in Drupal 8
Caching in Drupal 8valuebound
 

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 PerformanceBruce Tolley
 
Running PHP on Nginx / PHP wgtn
Running PHP on Nginx / PHP wgtnRunning PHP on Nginx / PHP wgtn
Running PHP on Nginx / PHP wgtnHarald 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 MeetupJonathan 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 2012Wim 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 TechniquesZendCon
 
Maximizing PHP Performance with NGINX
Maximizing PHP Performance with NGINXMaximizing PHP Performance with NGINX
Maximizing PHP Performance with NGINXNGINX, 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 NGINXWallarm
 
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) - EnglishKoombea
 
Load Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINXLoad Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINXNGINX, 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 ArchitectureNGINX, Inc.
 
NGINX High-performance Caching
NGINX High-performance CachingNGINX High-performance Caching
NGINX High-performance CachingNGINX, 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 InternalsJoshua 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

Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster WebsiteRayed Alrashed
 
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 OptimizationsPINT 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-optimizingAshok Modi
 
3 Hacks to Improve WordPress Performance
3 Hacks to Improve WordPress Performance3 Hacks to Improve WordPress Performance
3 Hacks to Improve WordPress PerformanceRF Studio
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax ApplicationsSiarhei Barysiuk
 
AJAX for Scalability
AJAX for ScalabilityAJAX for Scalability
AJAX for ScalabilityTuenti
 
Ajax For Scalability
Ajax For ScalabilityAjax For Scalability
Ajax For Scalabilityerikschultink
 
Client Side Performance @ Xero
Client Side Performance @ XeroClient Side Performance @ Xero
Client Side Performance @ XeroCraig Walker
 
Fundamentals of web_design_v2
Fundamentals of web_design_v2Fundamentals of web_design_v2
Fundamentals of web_design_v2hussain534
 
Frontend performance
Frontend performanceFrontend performance
Frontend performancesacred 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 speedPromet Source
 
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 speedAndy Kucharski
 

Similar to 5 critical-optimizations.v2 (20)

High-Speed HTML5
High-Speed HTML5High-Speed HTML5
High-Speed HTML5
 
Scaling 101
Scaling 101Scaling 101
Scaling 101
 
Scaling 101 test
Scaling 101 testScaling 101 test
Scaling 101 test
 
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

Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...CzechDreamin
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationZilliz
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomCzechDreamin
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyUXDXConf
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Julian Hyde
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsUXDXConf
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityScyllaDB
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessUXDXConf
 
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxBuy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxEasyPrinterHelp
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIES VE
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 

Recently uploaded (20)

Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxBuy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptx
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 

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!