SlideShare ist ein Scribd-Unternehmen logo
1 von 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!

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 

Kürzlich hochgeladen (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 

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!