SlideShare ist ein Scribd-Unternehmen logo
Performance Bytes
Measuring what matters
HELLO! I AM ..
SAGAR DESARDA
• < 1 year at AWS, but living the dream
• Fun Fact about me: I met Shaquille O'Neal in ‘19 &
have a picture taken with him
The views in this
presentation are mine
alone and do not
represent my employer
How much is a millisecond worth?
100ms 1%
REVENUE
400ms 9%
TRAFFIC
2.2s 15.4%
CONVERSIONS
25%
SEARCHES
500ms
1%
REVENUE
100ms
PAGE LOAD TIME
1 SECOND
SLOWER
11%
PAGE VIEWS
16%
CUSTOMER SATISFACTION
7%
CONVERIONS
Where are the
end-users
coming from?
Can one size fit all?
• Lots of devices
• Different screen sizes
• Varying Internet or Data speeds
• Many different browsers
Every thought about ..
Average time to load a mobile landing page
22 seconds
If a page takes more
than 3 sec to load
53%abandon
How do I look for the
problem then?
Where do I begin?
DISCOVERY
MEASURING WHAT
MATTERS
DEFINE THE SCOPE MEDIA ANALYSIS
APPLING FIRST
PRINCIPLES
Map it to the
organizational initiatives:
Example:
Improving Page Speed,
SEO,
Reducing page size,
Improving conversions
etc.
Identifying the metrics that
mean the most to your site
Is it the entire web site?
Or, just the homepage, or
a product page, or a
checkout?
Optimize website images
and videos for maximum
web performance and user
experience
1. Splitting the code
2. Slimming down libraries
3. Shared Bundles
4. Brotli/Zopfli
Compression
5. Leverage HTTP2 Server
Push, priorities,
resource hints, dns-
prefetch and
preconnect.
The 5-Point Plan
User-centric metrics
KEY METRICS
• First Meaningful Paint
• Largest Contextual Paint
• First Interactive
• Consistently Interactive
• Cumulative Layout Shift
• Visually Complete
• Total Blocking Time
• Custom Metric
GOALS
• Speed Index: 1,100-2,500
• First Meaningful Paint: 1-3s
• First Interactive: 2-4s
User-centric metrics
Content Breakdown
per Page
§ Average bytes per page, per
content type
Source: HTTP Archives
Image
Optimization
Time to look beyond JPEGs and PNGs
Format Savings
WebP 25-40%
JPEG 2000 (JPX) 20%
JPEG XR (JXR) 25%
HEIF (heef) 25%
Zopfli PNG 20%
Guetzli JPEG 20-30%
Images
Stop using animated GIFs!Stop
Use Animated PNGs or Animated WebP or muted videosUse
Optimize and serve images based on end-user’s device and bandwidthOptimize
Choose the right file type based on the browserChoose
Images
The future looks interesting!
§ AVIF
§ BPG
§ FLIF
Automatic Image
Transformation
§ Image management solution on the cloud
which automatically optimizes the website
images based on the end user’s device,
network, browser, bandwidth etc.
§ Simplicity with image management
§ Lighter and faster web pages improving
overall performance of the website
§ Quality images, with the goal being the
keep the perceptual quality intact
Source: Netflix
ALL of this applies to
videos as well
Analyzing web fonts
1
2
3
4
6
5
Optimizing Delivery Of Web Fonts
Prefetching
As an example, prefetching Google Fonts to
resolve the domain name faster.
Include this in the HEAD section of your HTML:
Prioritize based on browser support
86% of all modern browsers support WOFF
format, provide WOFF and WOFF2 (better
compression) and then fall back to web safe font.
Choose what styles do you need
Choose only the styles that you need, keep the
style down to a minimum.
Character sets
Also ensure that the character sets are down to a
minimum.
Host files locally & frontend it by a CDN
Many fonts are under an open source license.
Open Sans is a good example of one you can host
locally, say Amazon S3.
Further, front it by a CDN, say Amazon
CloudFront and cache it at the Edge to accelerate
the downstream delivery.
Caching the fonts
Set up TTLs to cache the font files on the CDN
and also on the browser
Consider preloading fonts
“
Shopify’s switch to preloading fonts saw
a 50% (1.2 second) improvement in time-
to-text-paint. This removed their flash-
of-invisible text completely.
“ O’REILLY FLUENT CONFERENCE ‘18
Provides a declarative fetch primitive that initiates an early fetch and separates fetching from
resource execution.
75% of the font
requests on the
web are from
Google Fonts.
29% pages include a
Google fonts
stylesheet link in
the document
<head>
1.7% of the mobile
pages reconnect to
the Web fonts hosts
0.4% of the pages
include a Google
fonts stylesheet link
as the first child in
the document
<head>
75% 29% 1.7% 0.4%
Fonts on the Web today
dns-prefetch Resolve DNS ahead of time
Example: Third party content where you know the
domain
Enabling DNS Prefetch (rel=dns-prefetch)
No DNS Prefresh With DNS Prefresh enabled
** You can run this on Web Page Test.
dns-prefetch
preconnect DNS look up + TCP handshake + TLS negotiation
Example: Third party content where you know the
domain
Enabling DNS Preconnect (rel=preconnect)
No DNS Preconnect With DNS Preconnect enabled
** You can run this on Web Page Test.
dns-prefetch
preconnect
preload
• Fetch a resource ahead of time
• Example: Image or js that you will need
for the current page
dns-prefetch
preconnect
Preload
prefetch Informs the browsers that a given resource should be
prefetched so it can be loaded more quickly
dns-prefetch
preconnect
Preload
prefetch
prerender
Prerender a page in the background for future
navigation
Example: Marketing funnel where next navigation is
predictable
‘Prerender’ Use-Case
Source: www.netlify.com
dns-prefetch
preconnect
Preload
prefetch
prerender
CURRENT PAGE
NEXT NAVIGATION
Does my browser support it?
Ref: https://caniuse.com/#search=dns-prefetch
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Another Example:
Checking HTTP2 vs HTTP3 Browser Support
Compression Defaults
• text/javascript
• font/ttf
• application/javascript
• text/xml
• application/json
• application/xml
Amazon CloudFront does a good job at covering
the wide range of MIME type in the default
settings to ensure that they are compressed.
Source: HTTP Archives
Compression techniques developed by Google
Brotli: Up to 25% gains over gzip compression
Compression Calculator is here.
LOTs of room to optimize the overall Internet.
Only 11% of the total compressed content on the web
is Brotli-encoded.
§ Process intensive
§ General preference is to have the CDN do offline
processing to have the gzip-content Brotli encoded
Many CDNs support Brotli compression
01
02
03
04
Brotli & Zopfli Compression
15%
20%
7.2%
JavaScript size reduction
CSS size reduction
Faster Time-To-Interactive
It provides user experience metrics for how
real-world Chrome users experience popular
destinations on the web.
Powered by real user measurement of key
user experience metrics across the public
web, gathered from millions of Chrome users.
It is THAT data which is used by Google for
SEO, Ad Rankings.
Chrome User Experience Report (CRUX)
How do I look at CRUX reports?
• Official Link: g.co/chromeuxdash [Use Chrome]
• Use-Cases:
• Look at the overall performance of your
site
• Month-over-month analysis of
performance (Especially good to know if
the code changes on the site have
influence the performance in any way)
• Since the data is publicly-available, do
competitor analysis and know where you
stand vs others.
How do I look at CRUX reports?
Impact of 3rd Parties
§ Performance
§ Privacy Concerns
§ Security
• British Airways breach of up to 380,000
payment cards
• $6.5 Million Class-Action Suit Over Ticketmaster
Data Breach Filed
Source: Catchpoint
Google DoubleClick ‘2018 Outage Impact Customer Experience
Google DoubleClick ‘2018
Outage:
Impact Customer
Experience
Source: Catchpoint
How do I protect myself against these 3rd party services?
Configure 3rd party services to load
after the page is interactive
01
Only implement 3rd parties when necessary. Set
some expectations with Marketing!
03
Monitor the performance of the 3rd
parties for performance degradation
05
Set scripts to load
asynchronously
02
Ensure that the 3rd
parties are
always up-to-date on the latest
version
04
Use a Tag Manager
06
If you can’t measure it,
you can’t improve it!
SYNTHETIC TOOLS REAL USER MONITORING (RUM)
Dynatrace, Catchpoint
§ Active Monitoring: Help you constantly
monitor round the clock
§ Important for regression testing, production
environment monitoring
§ A/B testing
Dynatrace RUM, New Relic Browser
§ Helps you accurately view the performance
that is experienced by the end users
§ Helps you map the performance metrics to the
business metrics (say, conversions)
How do I measure?
What I didn’t
cover
1. HTTP3
2. Mobile-first approach and how that translates to in
the web performance world
3. Understanding waterfall charts:
https://nooshu.github.io/blog/2019/10/02/how-to-read-
a-wpt-waterfall-chart/
4. Web Vitals: A Google initiative to improve the user-
experience on the web
Take Aways
1. Every millisecond that you can shave off the website
matters
2. If you can’t measure it, you can’t improve it
3. Brotli/Zopfli Compression
4. HTTP2 must! (HTTP3 soon)
5. Optimize images based on the end-user, device, browser
and bandwidth
6. WebPageTest - This seems the most highly regarded in
the webperf circles I know about. You pick a location and
a browser. Gives you 3 runs, shows waterfall, and a
bunch of stats with letter grades for compression/TTFB,
FCP, Document Complete and Fully Loaded times.
7. PageSpeed Insights - The original PageSpeed test from
Google, aka Lighthouse run on the web - gives you FCP,
FID, TTI, screenshots, opportunities, and Diagnostics
8. RequestMap from Webperf.Tools - Simon Hearnes'
request map generator which focuses on visualizing
Third Party Assets. Pick a location, and a device.
9. Caniuse.com: provides up-to-date browser support
tables for support of front-end web technologies on
desktop and mobile web browsers.
10. CRUX: performance data is based on real-world
measurement, as experienced by Chrome users
Thank You

Weitere ähnliche Inhalte

Was ist angesagt?

Speed up your site! #wcmtl2015 by Meagan Hanes
Speed up your site! #wcmtl2015 by Meagan HanesSpeed up your site! #wcmtl2015 by Meagan Hanes
Speed up your site! #wcmtl2015 by Meagan Hanes
Meagan Hanes
 
7 Habits of Exceptional Performance
7 Habits of Exceptional Performance7 Habits of Exceptional Performance
7 Habits of Exceptional Performance
Nicole Sullivan
 
WordPress SEO Site Optimization Strategies & Techniques
WordPress SEO Site Optimization Strategies & TechniquesWordPress SEO Site Optimization Strategies & Techniques
WordPress SEO Site Optimization Strategies & Techniques
Jeff Kemp
 

Was ist angesagt? (20)

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
 
Keep the Web Fast
Keep the Web FastKeep the Web Fast
Keep the Web Fast
 
Website speed optimization guide for technically advanced webmasters
Website speed optimization guide for technically advanced webmastersWebsite speed optimization guide for technically advanced webmasters
Website speed optimization guide for technically advanced webmasters
 
Client-side Web Performance Optimization [paper]
Client-side Web Performance Optimization [paper]Client-side Web Performance Optimization [paper]
Client-side Web Performance Optimization [paper]
 
Life in the Fast Lane: Speed, Usability & Search Engine Optimization
Life in the Fast Lane: Speed, Usability & Search Engine OptimizationLife in the Fast Lane: Speed, Usability & Search Engine Optimization
Life in the Fast Lane: Speed, Usability & Search Engine Optimization
 
Need for Speed: Website Edition – Website Optimization Tools and Techniques P...
Need for Speed: Website Edition – Website Optimization Tools and Techniques P...Need for Speed: Website Edition – Website Optimization Tools and Techniques P...
Need for Speed: Website Edition – Website Optimization Tools and Techniques P...
 
WPblog's Ultimate WordPress Guide to Boost Your Website Performance
WPblog's Ultimate WordPress Guide to Boost Your Website Performance WPblog's Ultimate WordPress Guide to Boost Your Website Performance
WPblog's Ultimate WordPress Guide to Boost Your Website Performance
 
Poslovni Imenik BiH - Lokal d.o.o.
Poslovni Imenik BiH - Lokal d.o.o.Poslovni Imenik BiH - Lokal d.o.o.
Poslovni Imenik BiH - Lokal d.o.o.
 
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
 
Measuring Web Performance (HighEdWeb FL Edition)
Measuring Web Performance (HighEdWeb FL Edition)Measuring Web Performance (HighEdWeb FL Edition)
Measuring Web Performance (HighEdWeb FL Edition)
 
Speed up your site! #wcmtl2015 by Meagan Hanes
Speed up your site! #wcmtl2015 by Meagan HanesSpeed up your site! #wcmtl2015 by Meagan Hanes
Speed up your site! #wcmtl2015 by Meagan Hanes
 
Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work EverywhereUsing Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work Everywhere
 
Core Web Vitals Optimization for any website, especially WordPress
Core Web Vitals Optimization for any website, especially WordPressCore Web Vitals Optimization for any website, especially WordPress
Core Web Vitals Optimization for any website, especially WordPress
 
7 Habits of Exceptional Performance
7 Habits of Exceptional Performance7 Habits of Exceptional Performance
7 Habits of Exceptional Performance
 
Dynamic Rendering for SEO by Nati Elimelech
Dynamic Rendering for SEO by Nati ElimelechDynamic Rendering for SEO by Nati Elimelech
Dynamic Rendering for SEO by Nati Elimelech
 
Web Page Speed - A Most Important Feature
Web Page Speed - A Most Important FeatureWeb Page Speed - A Most Important Feature
Web Page Speed - A Most Important Feature
 
Proven ways to improve your website performance optimizing front end and back...
Proven ways to improve your website performance optimizing front end and back...Proven ways to improve your website performance optimizing front end and back...
Proven ways to improve your website performance optimizing front end and back...
 
Is your website's speed letting you down?
Is your website's speed letting you down?Is your website's speed letting you down?
Is your website's speed letting you down?
 
Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)
 
WordPress SEO Site Optimization Strategies & Techniques
WordPress SEO Site Optimization Strategies & TechniquesWordPress SEO Site Optimization Strategies & Techniques
WordPress SEO Site Optimization Strategies & Techniques
 

Ähnlich wie Improving frontend performance

A Designer's Guide to Web Performance
A Designer's Guide to Web PerformanceA Designer's Guide to Web Performance
A Designer's Guide to Web Performance
Kevin Mandeville
 

Ähnlich wie Improving frontend performance (20)

Boosting your conversion rate through web performance improvements
Boosting your conversion rate through web performance improvementsBoosting your conversion rate through web performance improvements
Boosting your conversion rate through web performance improvements
 
Modern Web Applications
Modern Web ApplicationsModern Web Applications
Modern Web Applications
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performance
 
Tips tricks deliver_high_performing_secure_web_pages
Tips tricks deliver_high_performing_secure_web_pagesTips tricks deliver_high_performing_secure_web_pages
Tips tricks deliver_high_performing_secure_web_pages
 
Web performance e-book
Web performance e-bookWeb performance e-book
Web performance e-book
 
Designers Guide to Web Performance Yotta 2013
Designers Guide to Web Performance Yotta 2013Designers Guide to Web Performance Yotta 2013
Designers Guide to Web Performance Yotta 2013
 
A Designer's Guide to Web Performance
A Designer's Guide to Web PerformanceA Designer's Guide to Web Performance
A Designer's Guide to Web Performance
 
How and Why ($) to improve web performance.pdf
How and Why ($) to improve web performance.pdfHow and Why ($) to improve web performance.pdf
How and Why ($) to improve web performance.pdf
 
Core web vitals is the thing you should focus on if you own a website in 2021
Core web vitals is the thing you should focus on if you own a website in 2021Core web vitals is the thing you should focus on if you own a website in 2021
Core web vitals is the thing you should focus on if you own a website in 2021
 
Front-End Performance Checklist 2020
Front-End Performance Checklist 2020Front-End Performance Checklist 2020
Front-End Performance Checklist 2020
 
7 secrets of performance oriented front end development services
7 secrets of performance oriented front end development services7 secrets of performance oriented front end development services
7 secrets of performance oriented front end development services
 
Core Web Vitals in Website Design.pdf
Core Web Vitals in Website Design.pdfCore Web Vitals in Website Design.pdf
Core Web Vitals in Website Design.pdf
 
Maximising Online Resource Effectiveness Workshop Session 3/8 Priority issues
Maximising Online Resource Effectiveness Workshop Session 3/8 Priority issuesMaximising Online Resource Effectiveness Workshop Session 3/8 Priority issues
Maximising Online Resource Effectiveness Workshop Session 3/8 Priority issues
 
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
 
Keys To World-Class Retail Web Performance - Expert tips for holiday web read...
Keys To World-Class Retail Web Performance - Expert tips for holiday web read...Keys To World-Class Retail Web Performance - Expert tips for holiday web read...
Keys To World-Class Retail Web Performance - Expert tips for holiday web read...
 
Applying a Methodical Approach to Website Performance
Applying a Methodical Approach to Website PerformanceApplying a Methodical Approach to Website Performance
Applying a Methodical Approach to Website Performance
 
Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...
Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...
Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
An Introduction to Pagespeed Optimisation
An Introduction to Pagespeed OptimisationAn Introduction to Pagespeed Optimisation
An Introduction to Pagespeed Optimisation
 
The need for Speed: Advanced #webperf - SEOday 2018
The need for Speed: Advanced #webperf - SEOday 2018The need for Speed: Advanced #webperf - SEOday 2018
The need for Speed: Advanced #webperf - SEOday 2018
 

Kürzlich hochgeladen

ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
tuuww
 
Digital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdfDigital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdf
AbrahamGadissa
 
Paint shop management system project report.pdf
Paint shop management system project report.pdfPaint shop management system project report.pdf
Paint shop management system project report.pdf
Kamal Acharya
 
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdfDR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DrGurudutt
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
Kamal Acharya
 
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Lovely Professional University
 
School management system project report.pdf
School management system project report.pdfSchool management system project report.pdf
School management system project report.pdf
Kamal Acharya
 

Kürzlich hochgeladen (20)

KIT-601 Lecture Notes-UNIT-3.pdf Mining Data Stream
KIT-601 Lecture Notes-UNIT-3.pdf Mining Data StreamKIT-601 Lecture Notes-UNIT-3.pdf Mining Data Stream
KIT-601 Lecture Notes-UNIT-3.pdf Mining Data Stream
 
RM&IPR M4.pdfResearch Methodolgy & Intellectual Property Rights Series 4
RM&IPR M4.pdfResearch Methodolgy & Intellectual Property Rights Series 4RM&IPR M4.pdfResearch Methodolgy & Intellectual Property Rights Series 4
RM&IPR M4.pdfResearch Methodolgy & Intellectual Property Rights Series 4
 
Lect 2 - Design of slender column-2.pptx
Lect 2 - Design of slender column-2.pptxLect 2 - Design of slender column-2.pptx
Lect 2 - Design of slender column-2.pptx
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
 
retail automation billing system ppt.pptx
retail automation billing system ppt.pptxretail automation billing system ppt.pptx
retail automation billing system ppt.pptx
 
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
 
Dairy management system project report..pdf
Dairy management system project report..pdfDairy management system project report..pdf
Dairy management system project report..pdf
 
Digital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdfDigital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdf
 
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
 
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdfA CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
 
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
 
Online book store management system project.pdf
Online book store management system project.pdfOnline book store management system project.pdf
Online book store management system project.pdf
 
Paint shop management system project report.pdf
Paint shop management system project report.pdfPaint shop management system project report.pdf
Paint shop management system project report.pdf
 
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdfDR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
 
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdfRESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
 
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
 
Construction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptxConstruction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptx
 
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
 
School management system project report.pdf
School management system project report.pdfSchool management system project report.pdf
School management system project report.pdf
 

Improving frontend performance

  • 2. HELLO! I AM .. SAGAR DESARDA • < 1 year at AWS, but living the dream • Fun Fact about me: I met Shaquille O'Neal in ‘19 & have a picture taken with him
  • 3. The views in this presentation are mine alone and do not represent my employer
  • 4. How much is a millisecond worth?
  • 15. Can one size fit all? • Lots of devices • Different screen sizes • Varying Internet or Data speeds • Many different browsers
  • 17. Average time to load a mobile landing page 22 seconds
  • 18. If a page takes more than 3 sec to load 53%abandon
  • 19. How do I look for the problem then? Where do I begin?
  • 20. DISCOVERY MEASURING WHAT MATTERS DEFINE THE SCOPE MEDIA ANALYSIS APPLING FIRST PRINCIPLES Map it to the organizational initiatives: Example: Improving Page Speed, SEO, Reducing page size, Improving conversions etc. Identifying the metrics that mean the most to your site Is it the entire web site? Or, just the homepage, or a product page, or a checkout? Optimize website images and videos for maximum web performance and user experience 1. Splitting the code 2. Slimming down libraries 3. Shared Bundles 4. Brotli/Zopfli Compression 5. Leverage HTTP2 Server Push, priorities, resource hints, dns- prefetch and preconnect. The 5-Point Plan
  • 22. KEY METRICS • First Meaningful Paint • Largest Contextual Paint • First Interactive • Consistently Interactive • Cumulative Layout Shift • Visually Complete • Total Blocking Time • Custom Metric GOALS • Speed Index: 1,100-2,500 • First Meaningful Paint: 1-3s • First Interactive: 2-4s User-centric metrics
  • 23. Content Breakdown per Page § Average bytes per page, per content type Source: HTTP Archives
  • 24. Image Optimization Time to look beyond JPEGs and PNGs Format Savings WebP 25-40% JPEG 2000 (JPX) 20% JPEG XR (JXR) 25% HEIF (heef) 25% Zopfli PNG 20% Guetzli JPEG 20-30%
  • 25. Images Stop using animated GIFs!Stop Use Animated PNGs or Animated WebP or muted videosUse Optimize and serve images based on end-user’s device and bandwidthOptimize Choose the right file type based on the browserChoose
  • 26. Images The future looks interesting! § AVIF § BPG § FLIF
  • 27. Automatic Image Transformation § Image management solution on the cloud which automatically optimizes the website images based on the end user’s device, network, browser, bandwidth etc. § Simplicity with image management § Lighter and faster web pages improving overall performance of the website § Quality images, with the goal being the keep the perceptual quality intact Source: Netflix
  • 28. ALL of this applies to videos as well
  • 30. 1 2 3 4 6 5 Optimizing Delivery Of Web Fonts Prefetching As an example, prefetching Google Fonts to resolve the domain name faster. Include this in the HEAD section of your HTML: Prioritize based on browser support 86% of all modern browsers support WOFF format, provide WOFF and WOFF2 (better compression) and then fall back to web safe font. Choose what styles do you need Choose only the styles that you need, keep the style down to a minimum. Character sets Also ensure that the character sets are down to a minimum. Host files locally & frontend it by a CDN Many fonts are under an open source license. Open Sans is a good example of one you can host locally, say Amazon S3. Further, front it by a CDN, say Amazon CloudFront and cache it at the Edge to accelerate the downstream delivery. Caching the fonts Set up TTLs to cache the font files on the CDN and also on the browser
  • 32. “ Shopify’s switch to preloading fonts saw a 50% (1.2 second) improvement in time- to-text-paint. This removed their flash- of-invisible text completely. “ O’REILLY FLUENT CONFERENCE ‘18 Provides a declarative fetch primitive that initiates an early fetch and separates fetching from resource execution.
  • 33. 75% of the font requests on the web are from Google Fonts. 29% pages include a Google fonts stylesheet link in the document <head> 1.7% of the mobile pages reconnect to the Web fonts hosts 0.4% of the pages include a Google fonts stylesheet link as the first child in the document <head> 75% 29% 1.7% 0.4% Fonts on the Web today
  • 34. dns-prefetch Resolve DNS ahead of time Example: Third party content where you know the domain
  • 35. Enabling DNS Prefetch (rel=dns-prefetch) No DNS Prefresh With DNS Prefresh enabled ** You can run this on Web Page Test.
  • 36. dns-prefetch preconnect DNS look up + TCP handshake + TLS negotiation Example: Third party content where you know the domain
  • 37. Enabling DNS Preconnect (rel=preconnect) No DNS Preconnect With DNS Preconnect enabled ** You can run this on Web Page Test.
  • 38. dns-prefetch preconnect preload • Fetch a resource ahead of time • Example: Image or js that you will need for the current page
  • 39. dns-prefetch preconnect Preload prefetch Informs the browsers that a given resource should be prefetched so it can be loaded more quickly
  • 40. dns-prefetch preconnect Preload prefetch prerender Prerender a page in the background for future navigation Example: Marketing funnel where next navigation is predictable
  • 43. Does my browser support it? Ref: https://caniuse.com/#search=dns-prefetch "Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
  • 44. Another Example: Checking HTTP2 vs HTTP3 Browser Support
  • 45. Compression Defaults • text/javascript • font/ttf • application/javascript • text/xml • application/json • application/xml Amazon CloudFront does a good job at covering the wide range of MIME type in the default settings to ensure that they are compressed. Source: HTTP Archives
  • 46. Compression techniques developed by Google Brotli: Up to 25% gains over gzip compression Compression Calculator is here. LOTs of room to optimize the overall Internet. Only 11% of the total compressed content on the web is Brotli-encoded. § Process intensive § General preference is to have the CDN do offline processing to have the gzip-content Brotli encoded Many CDNs support Brotli compression 01 02 03 04 Brotli & Zopfli Compression
  • 47. 15% 20% 7.2% JavaScript size reduction CSS size reduction Faster Time-To-Interactive
  • 48. It provides user experience metrics for how real-world Chrome users experience popular destinations on the web. Powered by real user measurement of key user experience metrics across the public web, gathered from millions of Chrome users. It is THAT data which is used by Google for SEO, Ad Rankings. Chrome User Experience Report (CRUX)
  • 49. How do I look at CRUX reports? • Official Link: g.co/chromeuxdash [Use Chrome] • Use-Cases: • Look at the overall performance of your site • Month-over-month analysis of performance (Especially good to know if the code changes on the site have influence the performance in any way) • Since the data is publicly-available, do competitor analysis and know where you stand vs others. How do I look at CRUX reports?
  • 50. Impact of 3rd Parties § Performance § Privacy Concerns § Security • British Airways breach of up to 380,000 payment cards • $6.5 Million Class-Action Suit Over Ticketmaster Data Breach Filed
  • 51. Source: Catchpoint Google DoubleClick ‘2018 Outage Impact Customer Experience
  • 52. Google DoubleClick ‘2018 Outage: Impact Customer Experience Source: Catchpoint
  • 53. How do I protect myself against these 3rd party services? Configure 3rd party services to load after the page is interactive 01 Only implement 3rd parties when necessary. Set some expectations with Marketing! 03 Monitor the performance of the 3rd parties for performance degradation 05 Set scripts to load asynchronously 02 Ensure that the 3rd parties are always up-to-date on the latest version 04 Use a Tag Manager 06
  • 54. If you can’t measure it, you can’t improve it!
  • 55. SYNTHETIC TOOLS REAL USER MONITORING (RUM) Dynatrace, Catchpoint § Active Monitoring: Help you constantly monitor round the clock § Important for regression testing, production environment monitoring § A/B testing Dynatrace RUM, New Relic Browser § Helps you accurately view the performance that is experienced by the end users § Helps you map the performance metrics to the business metrics (say, conversions) How do I measure?
  • 56. What I didn’t cover 1. HTTP3 2. Mobile-first approach and how that translates to in the web performance world 3. Understanding waterfall charts: https://nooshu.github.io/blog/2019/10/02/how-to-read- a-wpt-waterfall-chart/ 4. Web Vitals: A Google initiative to improve the user- experience on the web
  • 57. Take Aways 1. Every millisecond that you can shave off the website matters 2. If you can’t measure it, you can’t improve it 3. Brotli/Zopfli Compression 4. HTTP2 must! (HTTP3 soon) 5. Optimize images based on the end-user, device, browser and bandwidth 6. WebPageTest - This seems the most highly regarded in the webperf circles I know about. You pick a location and a browser. Gives you 3 runs, shows waterfall, and a bunch of stats with letter grades for compression/TTFB, FCP, Document Complete and Fully Loaded times. 7. PageSpeed Insights - The original PageSpeed test from Google, aka Lighthouse run on the web - gives you FCP, FID, TTI, screenshots, opportunities, and Diagnostics 8. RequestMap from Webperf.Tools - Simon Hearnes' request map generator which focuses on visualizing Third Party Assets. Pick a location, and a device. 9. Caniuse.com: provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers. 10. CRUX: performance data is based on real-world measurement, as experienced by Chrome users