SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
Web Performance:
Behind the Scenes
By Mark Tomlinson,
The Performance Sherpa
Mark Tomlinson
- The Performance Sherpa
- 27 years doing performance things
- Former Microsoft, HP & PayPal
- PerfBytes Podcaster
- STPRadio Podcaster
- Speaker and Teacher on Performance
- Online mentoring and coaching
- Currently full-time at a startup in Philly
It all started with Steve
Souders’ realization that
we needed more focus on
client-side performance.
<- so he wrote this
book
...and it was such a
total hit with
engineers around
the world, he
decided to write
another one ->
RULES FORWEB PERFORMANCE
9. Adopt Website Monitoring
10. Prefetch and reconnect
11. SSL certificate/ HTTPS
12. Web Font Performance
13. Hotlink protection
14. 404 Errors
15. Infrastructure
16. Database Optimization
1. HTTP requests reduction
2. File compression
3. Web caching optimization
4. Code minification
5. Lossy compression
6. Replacement of vector graphics
7. Image Optimization
8. 301 Redirects
Everyone agrees on a basic list of guidelines for web perf:
Source: https://apiumhub.com/tech-blog-barcelona/web-performance-optimization-techniques/
RULES FORWEB PERFORMANCE
Thou shall not block thy
DOM.
Browser: use localbrowser caching?
Local resources are fastest:
• reduces round-trip http requests
• retrieved from local storage
• Web Storage API
• IndexedDB API
• New: Cache API
Gotchas:
• far-futures expires headers on
locally cached content specific to
functionality or branding
• Limits on storage space and speed
Put your CSS at the top of the page:
• avoid the “waiting on a blank page”
• immediately style the DOM after it loads
• CSSOM is created immediately after the DOM
Put your javascript at the bottom of the page:
• Scripts act upon the DOM/CSSOM
• Only really useful after the page is active
• Loading a script resource blocks HMTL and
CSS
Generally avoid “embedded” script or css
Browser: css andjavascript placement
Browser: async javascript loading?
Script tags have 2 steps:
• Load the script (local or remote)
• Execute the script
With async (or defer):
• the script download will not block
• html and css will render (DOM/CSSOM)
Be careful again:
• if script is required for functionality
• if javascript makes remote calls
Browser: prefetch andreconnect?
Perception of Performance Improvement:
• Pre-loading the “next” page/resource
• Runs “in the background”
• If user clicks on a link, it seems fast!
Three main kinds of prefetch:
• Link Prefetching
• DNS Prefetching
• Prerendering
Watch out: bandwidth limitations anyone
Browser: replace vector graphics?
Raster Images are mostly bad!
• Made of pixels in a grid
• Non-responsive
• Larger images = more pixels
Scalar Vector Graphics are GOOD!
• Small source size
• Responsive and scales up
• Minimal CPU to dynamically/resize
Gotcha: complex SVG can get big
Alternative: use “srcset” or “picture” tags
Browser: webfont performance?
Basics of web fonts:
• Unicode fonts can contain thousands of glyphs.
• There are four font formats: WOFF2, WOFF, EOT,
and TTF.
• Some font formats require the use of
compression.
Optimizing:
• Each font is an additional resource (round-trip)
• Some fonts can “block” the text rendering
• Use local() and url() directives for font-family
System:makefewer requests?
The starting point for all web optimization:
• Each remote resource requires a round-trip to/from
• always having some network latency
• always has at least 1 DNS lookup
• Generating the remote resource relies on back-end
systems? Storage? Database? Messaging?
Optimizing:
• load more content in a single roundtrip
• reduce the remote resources required to render
• use HTTP/2+ which helps do this for you
System:usenetwork caching?
Content Distribution Network (Akamai):
If you must make a round-trip:
• …maybe only go half-way?
• content can live in a “network cache”
• reduces load on the actual origin server
• has “time-to-live” settings
• programmatic API for CDN content
CDN Gotchas:
• pre-distributing large static content (video)
System:usefile compression?
Make big things smaller:
• any file-based resource can be compressed
• reduce network transfer time
• reduce remote storage
• Gzip is most common, also see Brotili
Compression Gotchas:
• requires cpu to compress on the server
• requires cpu to decompress on client
• requires time to compress on the server
• requires time to decompress on the client
System:minifyyourcode?
“Why you sendin’ all that white space?”
Pre-parsing code to be smaller size:
• reduces transfer time & bandwidth
• removing superfluous characters
• most end-users will not read your code
• most everyone will not ready comments
Optimizing:
• works on CSS, JS, and HTML and other code
• have both minified & non-minified versions
System:avoid404 not-foundand301 redirects?
Avoid 404 Not Found:
• why make the round-trip?
• fast, but still blocks a connection
• fast, but still hits the server
• consider caching custom 404’s
Avoid 301 Redirects:
• why make the round-trip?
• paying twice for 1 resource
• might be fast, but blocks a connection
• fast, but still hits the server
• consider a cache-header
LoadTesting – ISSTILL RELEVANT!!
Consider the last 2 items:
• #15 is Infrastructure
• #16 is Database Optimization
WELL OF COURSE!!!!
• finding and removing bottlenecks
• optimizing data source queries
• tuning the system bottom-up
• applying elastic scaling
• monitor all the things!
Thank you!!
Mark Tomlinson
The Performance Sherpa
@perfsherpa
PerfBytes Podcasting
www.perfbytes.com

Contenu connexe

Tendances

WordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngineWordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngineNGINX, Inc.
 
WordPress Optimization with Litespeed Cache #wpjkt14
WordPress Optimization with Litespeed Cache  #wpjkt14WordPress Optimization with Litespeed Cache  #wpjkt14
WordPress Optimization with Litespeed Cache #wpjkt14WordPress
 
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...PHP Conference Argentina
 
Leeward WordPress Meetup- Caching and Website Speed
Leeward WordPress Meetup- Caching and Website SpeedLeeward WordPress Meetup- Caching and Website Speed
Leeward WordPress Meetup- Caching and Website SpeedArlen Nagata
 
Windows Azure Service Bus
Windows Azure Service BusWindows Azure Service Bus
Windows Azure Service BusPavel Revenkov
 
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…Atwix
 
Word press workflows and gulp
Word press workflows and gulpWord press workflows and gulp
Word press workflows and gulpEli McMakin
 
Webpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ StepsWebpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ StepsGrgur Grisogono
 
Debugging WordPress Performance using EasyEngine
Debugging WordPress Performance using EasyEngineDebugging WordPress Performance using EasyEngine
Debugging WordPress Performance using EasyEnginertCamp
 
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)Grant Norwood
 
Hhvm and wordpress
Hhvm and wordpressHhvm and wordpress
Hhvm and wordpressMark Kelnar
 
Highly available Drupal on a Raspberry Pi cluster
Highly available Drupal on a Raspberry Pi clusterHighly available Drupal on a Raspberry Pi cluster
Highly available Drupal on a Raspberry Pi clusterJeff Geerling
 
What is a good technology stack today?
What is a good technology stack today?What is a good technology stack today?
What is a good technology stack today?Netlight Consulting
 
Shopzilla - Performance By Design
Shopzilla - Performance By DesignShopzilla - Performance By Design
Shopzilla - Performance By DesignTim Morrow
 
Building faster websites: web performance with WordPress
Building faster websites: web performance with WordPressBuilding faster websites: web performance with WordPress
Building faster websites: web performance with WordPressJohannes Siipola
 
Wordpress horsepower
Wordpress horsepowerWordpress horsepower
Wordpress horsepowerRoss Johnson
 
20130714 php matsuri - highly available php
20130714   php matsuri - highly available php20130714   php matsuri - highly available php
20130714 php matsuri - highly available phpGraham Weldon
 

Tendances (20)

WordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngineWordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngine
 
Meta Refresh 2014
Meta Refresh 2014Meta Refresh 2014
Meta Refresh 2014
 
Metarefresh
MetarefreshMetarefresh
Metarefresh
 
WordPress Optimization with Litespeed Cache #wpjkt14
WordPress Optimization with Litespeed Cache  #wpjkt14WordPress Optimization with Litespeed Cache  #wpjkt14
WordPress Optimization with Litespeed Cache #wpjkt14
 
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
 
Leeward WordPress Meetup- Caching and Website Speed
Leeward WordPress Meetup- Caching and Website SpeedLeeward WordPress Meetup- Caching and Website Speed
Leeward WordPress Meetup- Caching and Website Speed
 
Windows Azure Service Bus
Windows Azure Service BusWindows Azure Service Bus
Windows Azure Service Bus
 
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
 
Word press workflows and gulp
Word press workflows and gulpWord press workflows and gulp
Word press workflows and gulp
 
Webpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ StepsWebpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ Steps
 
SSDs are Awesome
SSDs are AwesomeSSDs are Awesome
SSDs are Awesome
 
Debugging WordPress Performance using EasyEngine
Debugging WordPress Performance using EasyEngineDebugging WordPress Performance using EasyEngine
Debugging WordPress Performance using EasyEngine
 
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
 
Hhvm and wordpress
Hhvm and wordpressHhvm and wordpress
Hhvm and wordpress
 
Highly available Drupal on a Raspberry Pi cluster
Highly available Drupal on a Raspberry Pi clusterHighly available Drupal on a Raspberry Pi cluster
Highly available Drupal on a Raspberry Pi cluster
 
What is a good technology stack today?
What is a good technology stack today?What is a good technology stack today?
What is a good technology stack today?
 
Shopzilla - Performance By Design
Shopzilla - Performance By DesignShopzilla - Performance By Design
Shopzilla - Performance By Design
 
Building faster websites: web performance with WordPress
Building faster websites: web performance with WordPressBuilding faster websites: web performance with WordPress
Building faster websites: web performance with WordPress
 
Wordpress horsepower
Wordpress horsepowerWordpress horsepower
Wordpress horsepower
 
20130714 php matsuri - highly available php
20130714   php matsuri - highly available php20130714   php matsuri - highly available php
20130714 php matsuri - highly available php
 

Similaire à PAC 2019 virtual Mark Tomlinson

Delivering Mobile Apps That Perform
Delivering Mobile Apps That PerformDelivering Mobile Apps That Perform
Delivering Mobile Apps That PerformRuben Goncalves
 
Optimization of modern web applications
Optimization of modern web applicationsOptimization of modern web applications
Optimization of modern web applicationsEugene Lazutkin
 
Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster WebsiteRayed Alrashed
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performanceAndrew Siemer
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuningJohn McCaffrey
 
10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App TodayChris Love
 
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...Amazon Web Services
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best PracticesRatnesh kumar, CSM
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQLKonstantin Gredeskoul
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Henry S
 
Configuring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web PerormanceConfiguring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web PerormanceSpark::red
 
AWS Summit London 2014 | Dynamic Content Acceleration (300)
AWS Summit London 2014 | Dynamic Content Acceleration (300)AWS Summit London 2014 | Dynamic Content Acceleration (300)
AWS Summit London 2014 | Dynamic Content Acceleration (300)Amazon Web Services
 
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014Maximiliano Firtman
 
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
 
Building Faster Websites
Building Faster WebsitesBuilding Faster Websites
Building Faster WebsitesCraig Walker
 

Similaire à PAC 2019 virtual Mark Tomlinson (20)

performance.ppt
performance.pptperformance.ppt
performance.ppt
 
Remix
RemixRemix
Remix
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
 
Delivering Mobile Apps That Perform
Delivering Mobile Apps That PerformDelivering Mobile Apps That Perform
Delivering Mobile Apps That Perform
 
#Webperf Choreography
#Webperf Choreography#Webperf Choreography
#Webperf Choreography
 
Optimization of modern web applications
Optimization of modern web applicationsOptimization of modern web applications
Optimization of modern web applications
 
Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster Website
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performance
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today
 
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best Practices
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
 
Hacking Web Performance
Hacking Web Performance Hacking Web Performance
Hacking Web Performance
 
Configuring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web PerormanceConfiguring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web Perormance
 
AWS Summit London 2014 | Dynamic Content Acceleration (300)
AWS Summit London 2014 | Dynamic Content Acceleration (300)AWS Summit London 2014 | Dynamic Content Acceleration (300)
AWS Summit London 2014 | Dynamic Content Acceleration (300)
 
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
 
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)
 
Building Faster Websites
Building Faster WebsitesBuilding Faster Websites
Building Faster Websites
 

Plus de Neotys

PAC 2020 Santorin - Giovanni Paolo Gibilisco
PAC 2020 Santorin - Giovanni Paolo GibiliscoPAC 2020 Santorin - Giovanni Paolo Gibilisco
PAC 2020 Santorin - Giovanni Paolo GibiliscoNeotys
 
PAC 2020 Santorin - Stijn Schepers
PAC 2020 Santorin - Stijn SchepersPAC 2020 Santorin - Stijn Schepers
PAC 2020 Santorin - Stijn SchepersNeotys
 
PAC 2020 Santorin - Edoardo Varani
PAC 2020 Santorin - Edoardo VaraniPAC 2020 Santorin - Edoardo Varani
PAC 2020 Santorin - Edoardo VaraniNeotys
 
PAC 2020 Santorin - Andreas Grabner
PAC 2020 Santorin - Andreas Grabner PAC 2020 Santorin - Andreas Grabner
PAC 2020 Santorin - Andreas Grabner Neotys
 
PAC 2020 Santorin - Vasilis Chatzinasios
PAC 2020 Santorin - Vasilis ChatzinasiosPAC 2020 Santorin - Vasilis Chatzinasios
PAC 2020 Santorin - Vasilis ChatzinasiosNeotys
 
PAC 2020 Santorin - Gopalkrishnan Yadav
PAC 2020 Santorin - Gopalkrishnan YadavPAC 2020 Santorin - Gopalkrishnan Yadav
PAC 2020 Santorin - Gopalkrishnan YadavNeotys
 
PAC 2020 Santorin - Hari Krishnan Ramachandran
PAC 2020 Santorin - Hari Krishnan RamachandranPAC 2020 Santorin - Hari Krishnan Ramachandran
PAC 2020 Santorin - Hari Krishnan RamachandranNeotys
 
PAC 2020 Santorin - Joerek Van Gaalen
PAC 2020 Santorin - Joerek Van GaalenPAC 2020 Santorin - Joerek Van Gaalen
PAC 2020 Santorin - Joerek Van GaalenNeotys
 
PAC 2020 Santorin - Ankur Jain
PAC 2020 Santorin - Ankur JainPAC 2020 Santorin - Ankur Jain
PAC 2020 Santorin - Ankur JainNeotys
 
PAC 2020 Santorin - Stephen Townshend
PAC 2020 Santorin - Stephen TownshendPAC 2020 Santorin - Stephen Townshend
PAC 2020 Santorin - Stephen TownshendNeotys
 
PAC 2020 Santorin - Leandro Melendez
PAC 2020 Santorin - Leandro MelendezPAC 2020 Santorin - Leandro Melendez
PAC 2020 Santorin - Leandro MelendezNeotys
 
PAC 2019 virtual Stephen Townshend
PAC 2019 virtual Stephen TownshendPAC 2019 virtual Stephen Townshend
PAC 2019 virtual Stephen TownshendNeotys
 
PAC 2019 virtual Federico Toledo
PAC 2019 virtual Federico Toledo   PAC 2019 virtual Federico Toledo
PAC 2019 virtual Federico Toledo Neotys
 
PAC 2019 virtual Leandro Melendez
PAC 2019 virtual Leandro Melendez PAC 2019 virtual Leandro Melendez
PAC 2019 virtual Leandro Melendez Neotys
 
PAC 2019 virtual Srivalli Aparna
PAC 2019 virtual Srivalli AparnaPAC 2019 virtual Srivalli Aparna
PAC 2019 virtual Srivalli AparnaNeotys
 
PAC 2019 virtual Reuben Rajan George
PAC 2019 virtual Reuben Rajan GeorgePAC 2019 virtual Reuben Rajan George
PAC 2019 virtual Reuben Rajan GeorgeNeotys
 
PAC 2019 virtual Joerek Van Gaalen
PAC 2019 virtual Joerek Van GaalenPAC 2019 virtual Joerek Van Gaalen
PAC 2019 virtual Joerek Van GaalenNeotys
 
PAC 2019 virtual Hemalatha Murugesan
PAC 2019 virtual Hemalatha Murugesan  PAC 2019 virtual Hemalatha Murugesan
PAC 2019 virtual Hemalatha Murugesan Neotys
 
PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux Neotys
 
PAC 2019 virtual Arjan Van Den Berg
PAC 2019 virtual Arjan Van Den Berg  PAC 2019 virtual Arjan Van Den Berg
PAC 2019 virtual Arjan Van Den Berg Neotys
 

Plus de Neotys (20)

PAC 2020 Santorin - Giovanni Paolo Gibilisco
PAC 2020 Santorin - Giovanni Paolo GibiliscoPAC 2020 Santorin - Giovanni Paolo Gibilisco
PAC 2020 Santorin - Giovanni Paolo Gibilisco
 
PAC 2020 Santorin - Stijn Schepers
PAC 2020 Santorin - Stijn SchepersPAC 2020 Santorin - Stijn Schepers
PAC 2020 Santorin - Stijn Schepers
 
PAC 2020 Santorin - Edoardo Varani
PAC 2020 Santorin - Edoardo VaraniPAC 2020 Santorin - Edoardo Varani
PAC 2020 Santorin - Edoardo Varani
 
PAC 2020 Santorin - Andreas Grabner
PAC 2020 Santorin - Andreas Grabner PAC 2020 Santorin - Andreas Grabner
PAC 2020 Santorin - Andreas Grabner
 
PAC 2020 Santorin - Vasilis Chatzinasios
PAC 2020 Santorin - Vasilis ChatzinasiosPAC 2020 Santorin - Vasilis Chatzinasios
PAC 2020 Santorin - Vasilis Chatzinasios
 
PAC 2020 Santorin - Gopalkrishnan Yadav
PAC 2020 Santorin - Gopalkrishnan YadavPAC 2020 Santorin - Gopalkrishnan Yadav
PAC 2020 Santorin - Gopalkrishnan Yadav
 
PAC 2020 Santorin - Hari Krishnan Ramachandran
PAC 2020 Santorin - Hari Krishnan RamachandranPAC 2020 Santorin - Hari Krishnan Ramachandran
PAC 2020 Santorin - Hari Krishnan Ramachandran
 
PAC 2020 Santorin - Joerek Van Gaalen
PAC 2020 Santorin - Joerek Van GaalenPAC 2020 Santorin - Joerek Van Gaalen
PAC 2020 Santorin - Joerek Van Gaalen
 
PAC 2020 Santorin - Ankur Jain
PAC 2020 Santorin - Ankur JainPAC 2020 Santorin - Ankur Jain
PAC 2020 Santorin - Ankur Jain
 
PAC 2020 Santorin - Stephen Townshend
PAC 2020 Santorin - Stephen TownshendPAC 2020 Santorin - Stephen Townshend
PAC 2020 Santorin - Stephen Townshend
 
PAC 2020 Santorin - Leandro Melendez
PAC 2020 Santorin - Leandro MelendezPAC 2020 Santorin - Leandro Melendez
PAC 2020 Santorin - Leandro Melendez
 
PAC 2019 virtual Stephen Townshend
PAC 2019 virtual Stephen TownshendPAC 2019 virtual Stephen Townshend
PAC 2019 virtual Stephen Townshend
 
PAC 2019 virtual Federico Toledo
PAC 2019 virtual Federico Toledo   PAC 2019 virtual Federico Toledo
PAC 2019 virtual Federico Toledo
 
PAC 2019 virtual Leandro Melendez
PAC 2019 virtual Leandro Melendez PAC 2019 virtual Leandro Melendez
PAC 2019 virtual Leandro Melendez
 
PAC 2019 virtual Srivalli Aparna
PAC 2019 virtual Srivalli AparnaPAC 2019 virtual Srivalli Aparna
PAC 2019 virtual Srivalli Aparna
 
PAC 2019 virtual Reuben Rajan George
PAC 2019 virtual Reuben Rajan GeorgePAC 2019 virtual Reuben Rajan George
PAC 2019 virtual Reuben Rajan George
 
PAC 2019 virtual Joerek Van Gaalen
PAC 2019 virtual Joerek Van GaalenPAC 2019 virtual Joerek Van Gaalen
PAC 2019 virtual Joerek Van Gaalen
 
PAC 2019 virtual Hemalatha Murugesan
PAC 2019 virtual Hemalatha Murugesan  PAC 2019 virtual Hemalatha Murugesan
PAC 2019 virtual Hemalatha Murugesan
 
PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux
 
PAC 2019 virtual Arjan Van Den Berg
PAC 2019 virtual Arjan Van Den Berg  PAC 2019 virtual Arjan Van Den Berg
PAC 2019 virtual Arjan Van Den Berg
 

Dernier

data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLManishPatel169454
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Christo Ananth
 

Dernier (20)

data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 

PAC 2019 virtual Mark Tomlinson

  • 1. Web Performance: Behind the Scenes By Mark Tomlinson, The Performance Sherpa
  • 2. Mark Tomlinson - The Performance Sherpa - 27 years doing performance things - Former Microsoft, HP & PayPal - PerfBytes Podcaster - STPRadio Podcaster - Speaker and Teacher on Performance - Online mentoring and coaching - Currently full-time at a startup in Philly
  • 3. It all started with Steve Souders’ realization that we needed more focus on client-side performance. <- so he wrote this book ...and it was such a total hit with engineers around the world, he decided to write another one ->
  • 4. RULES FORWEB PERFORMANCE 9. Adopt Website Monitoring 10. Prefetch and reconnect 11. SSL certificate/ HTTPS 12. Web Font Performance 13. Hotlink protection 14. 404 Errors 15. Infrastructure 16. Database Optimization 1. HTTP requests reduction 2. File compression 3. Web caching optimization 4. Code minification 5. Lossy compression 6. Replacement of vector graphics 7. Image Optimization 8. 301 Redirects Everyone agrees on a basic list of guidelines for web perf: Source: https://apiumhub.com/tech-blog-barcelona/web-performance-optimization-techniques/
  • 5. RULES FORWEB PERFORMANCE Thou shall not block thy DOM.
  • 6. Browser: use localbrowser caching? Local resources are fastest: • reduces round-trip http requests • retrieved from local storage • Web Storage API • IndexedDB API • New: Cache API Gotchas: • far-futures expires headers on locally cached content specific to functionality or branding • Limits on storage space and speed
  • 7. Put your CSS at the top of the page: • avoid the “waiting on a blank page” • immediately style the DOM after it loads • CSSOM is created immediately after the DOM Put your javascript at the bottom of the page: • Scripts act upon the DOM/CSSOM • Only really useful after the page is active • Loading a script resource blocks HMTL and CSS Generally avoid “embedded” script or css Browser: css andjavascript placement
  • 8. Browser: async javascript loading? Script tags have 2 steps: • Load the script (local or remote) • Execute the script With async (or defer): • the script download will not block • html and css will render (DOM/CSSOM) Be careful again: • if script is required for functionality • if javascript makes remote calls
  • 9. Browser: prefetch andreconnect? Perception of Performance Improvement: • Pre-loading the “next” page/resource • Runs “in the background” • If user clicks on a link, it seems fast! Three main kinds of prefetch: • Link Prefetching • DNS Prefetching • Prerendering Watch out: bandwidth limitations anyone
  • 10. Browser: replace vector graphics? Raster Images are mostly bad! • Made of pixels in a grid • Non-responsive • Larger images = more pixels Scalar Vector Graphics are GOOD! • Small source size • Responsive and scales up • Minimal CPU to dynamically/resize Gotcha: complex SVG can get big Alternative: use “srcset” or “picture” tags
  • 11. Browser: webfont performance? Basics of web fonts: • Unicode fonts can contain thousands of glyphs. • There are four font formats: WOFF2, WOFF, EOT, and TTF. • Some font formats require the use of compression. Optimizing: • Each font is an additional resource (round-trip) • Some fonts can “block” the text rendering • Use local() and url() directives for font-family
  • 12. System:makefewer requests? The starting point for all web optimization: • Each remote resource requires a round-trip to/from • always having some network latency • always has at least 1 DNS lookup • Generating the remote resource relies on back-end systems? Storage? Database? Messaging? Optimizing: • load more content in a single roundtrip • reduce the remote resources required to render • use HTTP/2+ which helps do this for you
  • 13. System:usenetwork caching? Content Distribution Network (Akamai): If you must make a round-trip: • …maybe only go half-way? • content can live in a “network cache” • reduces load on the actual origin server • has “time-to-live” settings • programmatic API for CDN content CDN Gotchas: • pre-distributing large static content (video)
  • 14. System:usefile compression? Make big things smaller: • any file-based resource can be compressed • reduce network transfer time • reduce remote storage • Gzip is most common, also see Brotili Compression Gotchas: • requires cpu to compress on the server • requires cpu to decompress on client • requires time to compress on the server • requires time to decompress on the client
  • 15. System:minifyyourcode? “Why you sendin’ all that white space?” Pre-parsing code to be smaller size: • reduces transfer time & bandwidth • removing superfluous characters • most end-users will not read your code • most everyone will not ready comments Optimizing: • works on CSS, JS, and HTML and other code • have both minified & non-minified versions
  • 16. System:avoid404 not-foundand301 redirects? Avoid 404 Not Found: • why make the round-trip? • fast, but still blocks a connection • fast, but still hits the server • consider caching custom 404’s Avoid 301 Redirects: • why make the round-trip? • paying twice for 1 resource • might be fast, but blocks a connection • fast, but still hits the server • consider a cache-header
  • 17. LoadTesting – ISSTILL RELEVANT!! Consider the last 2 items: • #15 is Infrastructure • #16 is Database Optimization WELL OF COURSE!!!! • finding and removing bottlenecks • optimizing data source queries • tuning the system bottom-up • applying elastic scaling • monitor all the things!
  • 18. Thank you!! Mark Tomlinson The Performance Sherpa @perfsherpa PerfBytes Podcasting www.perfbytes.com