SlideShare a Scribd company logo
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

More Related Content

What's hot

WordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngineWordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngine
NGINX, Inc.
 
WordPress Optimization with Litespeed Cache #wpjkt14
WordPress Optimization with Litespeed Cache  #wpjkt14WordPress Optimization with Litespeed Cache  #wpjkt14
WordPress Optimization with Litespeed Cache #wpjkt14
WordPress
 
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 Speed
Arlen 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 gulp
Eli McMakin
 
Webpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ StepsWebpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ Steps
Grgur Grisogono
 
SSDs are Awesome
SSDs are AwesomeSSDs are Awesome
SSDs are Awesome
Barry Abrahamson
 
Debugging WordPress Performance using EasyEngine
Debugging WordPress Performance using EasyEngineDebugging WordPress Performance using EasyEngine
Debugging WordPress Performance using EasyEngine
rtCamp
 
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 wordpress
Mark 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 cluster
Jeff 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 Design
Tim 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 WordPress
Johannes Siipola
 
Wordpress horsepower
Wordpress horsepowerWordpress horsepower
Wordpress horsepower
Ross 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
 

What's hot (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
 

Similar to PAC 2019 virtual Mark Tomlinson

performance.ppt
performance.pptperformance.ppt
performance.ppt
fakeaccount225095
 
Remix
RemixRemix
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
Betclic Everest Group Tech Team
 
Delivering Mobile Apps That Perform
Delivering Mobile Apps That PerformDelivering Mobile Apps That Perform
Delivering Mobile Apps That Perform
Ruben Goncalves
 
#Webperf Choreography
#Webperf Choreography#Webperf Choreography
#Webperf Choreography
Harald Kirschner
 
Optimization of modern web applications
Optimization of modern web applicationsOptimization of modern web applications
Optimization of modern web applications
Eugene 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 performance
Andrew Siemer
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
John 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 Today
Chris 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 Practices
Ratnesh 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 PostgreSQL
Konstantin 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 1
Henry S
 
Hacking Web Performance
Hacking Web Performance Hacking Web Performance
Hacking Web Performance
Maximiliano Firtman
 
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
Spark::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 2014
Maximiliano 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 Websites
Craig Walker
 

Similar to 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
 

More from Neotys

PAC 2020 Santorin - Giovanni Paolo Gibilisco
PAC 2020 Santorin - Giovanni Paolo GibiliscoPAC 2020 Santorin - Giovanni Paolo Gibilisco
PAC 2020 Santorin - Giovanni Paolo Gibilisco
Neotys
 
PAC 2020 Santorin - Stijn Schepers
PAC 2020 Santorin - Stijn SchepersPAC 2020 Santorin - Stijn Schepers
PAC 2020 Santorin - Stijn Schepers
Neotys
 
PAC 2020 Santorin - Edoardo Varani
PAC 2020 Santorin - Edoardo VaraniPAC 2020 Santorin - Edoardo Varani
PAC 2020 Santorin - Edoardo Varani
Neotys
 
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 Chatzinasios
Neotys
 
PAC 2020 Santorin - Gopalkrishnan Yadav
PAC 2020 Santorin - Gopalkrishnan YadavPAC 2020 Santorin - Gopalkrishnan Yadav
PAC 2020 Santorin - Gopalkrishnan Yadav
Neotys
 
PAC 2020 Santorin - Hari Krishnan Ramachandran
PAC 2020 Santorin - Hari Krishnan RamachandranPAC 2020 Santorin - Hari Krishnan Ramachandran
PAC 2020 Santorin - Hari Krishnan Ramachandran
Neotys
 
PAC 2020 Santorin - Joerek Van Gaalen
PAC 2020 Santorin - Joerek Van GaalenPAC 2020 Santorin - Joerek Van Gaalen
PAC 2020 Santorin - Joerek Van Gaalen
Neotys
 
PAC 2020 Santorin - Ankur Jain
PAC 2020 Santorin - Ankur JainPAC 2020 Santorin - Ankur Jain
PAC 2020 Santorin - Ankur Jain
Neotys
 
PAC 2020 Santorin - Stephen Townshend
PAC 2020 Santorin - Stephen TownshendPAC 2020 Santorin - Stephen Townshend
PAC 2020 Santorin - Stephen Townshend
Neotys
 
PAC 2020 Santorin - Leandro Melendez
PAC 2020 Santorin - Leandro MelendezPAC 2020 Santorin - Leandro Melendez
PAC 2020 Santorin - Leandro Melendez
Neotys
 
PAC 2019 virtual Stephen Townshend
PAC 2019 virtual Stephen TownshendPAC 2019 virtual Stephen Townshend
PAC 2019 virtual Stephen Townshend
Neotys
 
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 Aparna
Neotys
 
PAC 2019 virtual Reuben Rajan George
PAC 2019 virtual Reuben Rajan GeorgePAC 2019 virtual Reuben Rajan George
PAC 2019 virtual Reuben Rajan George
Neotys
 
PAC 2019 virtual Joerek Van Gaalen
PAC 2019 virtual Joerek Van GaalenPAC 2019 virtual Joerek Van Gaalen
PAC 2019 virtual Joerek Van Gaalen
Neotys
 
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
 

More from 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
 

Recently uploaded

Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 

Recently uploaded (20)

Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 

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