SlideShare une entreprise Scribd logo
1  sur  51
#gatsbyconf
#gatsbyconf
The Anatomy of A
Performance Audit
Sam Bhagwat • Co-founder, Chief Strategy Officer, Gatsby
#gatsbyconf
● What does fast mean?
● How do you stay fast?
● How do you get fast?
#gatsbyconf
UX
Why performance matters
Conversion Search
Ranking
#gatsbyconf
Making a slow website fast is hard
Everything
impacts perf
Hard to know
what changes
matter for you
Get fast,
stay fast
#gatsbyconf
● First, the performance improvements you make
● Second, the process you have to quantify,
maintain, and extend those improvements
Perf: improvements and process
#gatsbyconf
[perf improvements without a perf
process]
#gatsbyconf
Part 0: What is Fast?
#gatsbyconf
Core Web Vitals
(loading) (interactivity) (layout shift)
#gatsbyconf
Part 1: Stay Fast
Creating a performance
process for your Gatsby site
#gatsbyconf
1. Choose a primary testing tool
Lighthouse (Google) WebPageTest
#gatsbyconf
Gatsby Cloud Third-party services
2. Per-commit, per-PR perf monitoring
#gatsbyconf
3. Quantify each change & watch the #s
Before After
#gatsbyconf
Part 2: Get Fast
Implementing Performance Improvements
#gatsbyconf
All fast websites are alike.
All slow websites are slow in
different ways.
- Leo Tolstoy Kyle Mathews
#gatsbyconf
All performance work is telling
your user’s browser how to do
less work
#gatsbyconf
1. Fetch and parse third party scripts.
2. Fetch and parse your main JavaScript bundle.
3. Fetch, load and paint images and media
4. Load CSS & fonts and paint the screen
5. Make calls over the network to do (1)-(4)
Types of work the browser does
(post-HTML load)
#gatsbyconf
1. Address third-party script impact
2. Reduce JavaScript bundle size
3. Optimize image and media delivery
4. Optimize styling and font files
5. Resource requests & CDN configuration
Types of improvements you can make
#gatsbyconf
For each “browser work” type:
1. Triage: triage the overall impact caused by this type of
browser work to decide your level of effort
2. Isolate: Identify & isolate key lines of code impacting perf
3. Refactor: when clear-cut, remove or refactor code
4. Evaluate: when not clear-cut, estimate potential perf gain
from refactoring, and evaluate whether it’s worth the time
TIRE: a perf improvement pattern
#gatsbyconf
1. Address third-party script impact
2. Reduce JavaScript bundle size
3. Optimize image and media delivery
4. Optimize styling and font files
5. Resource requests & CDN configuration
(1)Third-party scripts ||
#gatsbyconf
(1)Third-party scripts || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
① “Reduce
the impact of
third-party
code”
② “Minimize
main-thread
work”
③ “Reduce
JavaScript
execution time”
(1)Third-party scripts || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
● Remove each script, test before / after
Lighthouse scores (individual impact)
● Remove all scripts, test before / after
Lighthouse scores (collective impact)
Understand script impact
(1)Third-party scripts || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
Understand the business “why”
(1)Third-party scripts || Triage | Isolate | Refactor | Evaluate
● For each script, understand:
○ Overall business purpose
○ Relative importance
○ Who uses the data
#gatsbyconf
1. Cut when possible
a. Remove high-cost, low-
value scripts
b. Remove unused scripts
2. Optimize everything else
a. Lazy load scripts
b. Inline scripts
Reduce script impact
(1)Third-party scripts || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
1. Address third-party script impact
2. Reduce JavaScript bundle size
3. Optimize image and media delivery
4. Optimize styling and font files
5. Resource requests & CDN configuration
(2) Reduce bundle size
#gatsbyconf
② “Reduce
JavaScript
execution time”
① “Minimize
main-thread
work”
(2) Reduce bundle size || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
Install gatsby-plugin-webpack-bundle-analyser-v2
and add it to your gatsby-config.js
Profile your code
(2) Reduce bundle size || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
(2) Reduce bundle size || Triage | Isolate | Refactor | Evaluate
Experimental: gatsby-plugin-perf-budgets
Visit /_report.html
#gatsbyconf
Plugin
output for
a page
(2) Reduce bundle size || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
Application level
chunks (shared
with all pages)
framework-*.js
(React / React-DOM)
app-*.js
(Gatsby framework)
webpack-runtime-*.js
(coordinates bundle
interaction)
commons-*.js
(libraries used on
every page)
styles-*.js
(CSS modules)
(2) Reduce bundle size || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
Template-level
chunks (shared
with pages with
this template )
component-*.js
(each component & the
components it uses)
[hash].js
(3rd-party libraries
used by this template)
(2) Reduce bundle size || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
1. Order of operations
a. Audit commons-*.js, app-*.js first
b. Audit critical path templates
2. On each chunk….
a. Identify large third-party imports (eg, Moment)
b. Identify components & data that shouldn’t be
needed in a particular template or commons
Identify high-leverage points
(2) Reduce bundle size || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
1. Replace heavy third-party libraries with
lighter weight alternatives
2. Upgrade to Gatsby 3 for smaller bundles
3. Examine your import structure
a. Look for shared components pulling in
other, unneeded components
Make high-impact changes
(2) Reduce bundle size || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
1. Address third-party script impact
2. Reduce JavaScript bundle size
3. Optimize image and media delivery
4. Optimize styling and font files
5. Resource requests & CDN configuration
#gatsbyconf
① “Defer
offscreen
images”
② “Serve
images in next-
gen formats”
③ “Efficiently
encode images”
(3) Images and Media|| Triage | Isolate | Refactor | Evaluate
#gatsbyconf
1. Smaller & faster than gatsby-image
2. Much faster than not using gatsby-image at all!
Use gatsby-plugin-image
(3) Images and Media|| Triage | Isolate | Refactor | Evaluate
#gatsbyconf
1. Address third-party script impact
2. Reduce JavaScript bundle size
3. Use Gatsby’s tools for images and other media
4. Optimize styling and font files
5. Resource requests & CDN configuration
#gatsbyconf
(command-shift-P)
(4) Styling and Fonts || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
(4) Styling and Fonts || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
(4) Styling and Fonts || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
(4) Styling and Fonts || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
….consider refactoring to a more modular CSS solution
(4) Styling and Fonts || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
If you see >30kb font files, slim down
● Prefer woff2, woff to ttf
● Trim down to one alphabet
(eg Latin for US/EU)
● Prefer (correct) font self-
hosting to Google Fonts to
save request times
(4) Styling and Fonts || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
1. Address third-party script impact
2. Reduce JavaScript bundle size
3. Use Gatsby’s tools for images and other media
4. Optimize styling and font files
5. Resource requests & CDN configuration
#gatsbyconf
● Load critical assets from your main domain where possible.
● Preconnect to subdomains using gatsby-plugin-preconnect
● Utilize Gatsby Link to optimizing intra-site navigation
Resource requests & CDN config
(5) Resources & CDN || Triage | Isolate | Refactor | Evaluate
#gatsbyconf
● Perf matters because of UX, conversions, and search rankings
● Like getting healthy, hard part is getting fast and staying fast
● You stay fast by running a testing tool on every PR and commit.
● You get fast by:
○ ....looking at five types of browser work (third-party scripts,
JS bundles, images & media, styles, and requests)
○ And following the TIRE process (Triage relative importance,
Isolate key code, Refactor if easy, Evaluate impact if not)
So, to recap…….
#gatsbyconf
● Sign up for Gatsby Cloud
● Use the new gatsby-plugin-image
And...if you only have a couple hours
#gatsbyconf
Oh, and one last thing….
#gatsbyconf
Want to do this even better? We’re
happy to help.
#gatsbyconf
Want to do this even better? We’re
happy to help.
gatsbyjs.com/concierge/
#gatsbyconf
#gatsbyconf
Thank you!✌
Sam Bhagwat
@calcsam

Contenu connexe

Tendances

React in Action ( PDFDrive ).pdf
React in Action ( PDFDrive ).pdfReact in Action ( PDFDrive ).pdf
React in Action ( PDFDrive ).pdfalmako2
 
Redis Reliability, Performance & Innovation
Redis Reliability, Performance & InnovationRedis Reliability, Performance & Innovation
Redis Reliability, Performance & InnovationRedis Labs
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
An Introduction to WebAssembly
An Introduction to WebAssemblyAn Introduction to WebAssembly
An Introduction to WebAssemblyDaniel Budden
 
[1A1]행복한프로그래머를위한철학
[1A1]행복한프로그래머를위한철학[1A1]행복한프로그래머를위한철학
[1A1]행복한프로그래머를위한철학NAVER D2
 
ジャバのはなし、JAVAのはなし、Javaのはなし
ジャバのはなし、JAVAのはなし、Javaのはなしジャバのはなし、JAVAのはなし、Javaのはなし
ジャバのはなし、JAVAのはなし、JavaのはなしYujiSoftware
 
React web development
React web developmentReact web development
React web developmentRully Ramanda
 
React – ¿Qué es React.js?
React – ¿Qué es React.js?React – ¿Qué es React.js?
React – ¿Qué es React.js?Gorka Magaña
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Projectrossburton
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017Docker, Inc.
 
Web Assembly Big Picture
Web Assembly Big PictureWeb Assembly Big Picture
Web Assembly Big PictureYousif Shalaby
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionRobert Reiz
 
20160427 ROS 4차 강의 (for 아스라다 팀)
20160427 ROS 4차 강의 (for 아스라다 팀)20160427 ROS 4차 강의 (for 아스라다 팀)
20160427 ROS 4차 강의 (for 아스라다 팀)Yoonseok Pyo
 
Marco Cavallini @ LinuxLab 2018 : Workshop Yocto Project, an automatic genera...
Marco Cavallini @ LinuxLab 2018 : Workshop Yocto Project, an automatic genera...Marco Cavallini @ LinuxLab 2018 : Workshop Yocto Project, an automatic genera...
Marco Cavallini @ LinuxLab 2018 : Workshop Yocto Project, an automatic genera...Marco Cavallini
 
강좌 07 ARM 프로세서용 아두이노
강좌 07 ARM 프로세서용 아두이노강좌 07 ARM 프로세서용 아두이노
강좌 07 ARM 프로세서용 아두이노chcbaram
 

Tendances (20)

React in Action ( PDFDrive ).pdf
React in Action ( PDFDrive ).pdfReact in Action ( PDFDrive ).pdf
React in Action ( PDFDrive ).pdf
 
Git basic
Git basicGit basic
Git basic
 
Redis Reliability, Performance & Innovation
Redis Reliability, Performance & InnovationRedis Reliability, Performance & Innovation
Redis Reliability, Performance & Innovation
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
An Introduction to WebAssembly
An Introduction to WebAssemblyAn Introduction to WebAssembly
An Introduction to WebAssembly
 
[1A1]행복한프로그래머를위한철학
[1A1]행복한프로그래머를위한철학[1A1]행복한프로그래머를위한철학
[1A1]행복한프로그래머를위한철학
 
ジャバのはなし、JAVAのはなし、Javaのはなし
ジャバのはなし、JAVAのはなし、Javaのはなしジャバのはなし、JAVAのはなし、Javaのはなし
ジャバのはなし、JAVAのはなし、Javaのはなし
 
React web development
React web developmentReact web development
React web development
 
React – ¿Qué es React.js?
React – ¿Qué es React.js?React – ¿Qué es React.js?
React – ¿Qué es React.js?
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Project
 
Qemu JIT Code Generator and System Emulation
Qemu JIT Code Generator and System EmulationQemu JIT Code Generator and System Emulation
Qemu JIT Code Generator and System Emulation
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017
 
Web Assembly Big Picture
Web Assembly Big PictureWeb Assembly Big Picture
Web Assembly Big Picture
 
Medium 시작하기
Medium 시작하기 Medium 시작하기
Medium 시작하기
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
20160427 ROS 4차 강의 (for 아스라다 팀)
20160427 ROS 4차 강의 (for 아스라다 팀)20160427 ROS 4차 강의 (for 아스라다 팀)
20160427 ROS 4차 강의 (for 아스라다 팀)
 
Marco Cavallini @ LinuxLab 2018 : Workshop Yocto Project, an automatic genera...
Marco Cavallini @ LinuxLab 2018 : Workshop Yocto Project, an automatic genera...Marco Cavallini @ LinuxLab 2018 : Workshop Yocto Project, an automatic genera...
Marco Cavallini @ LinuxLab 2018 : Workshop Yocto Project, an automatic genera...
 
강좌 07 ARM 프로세서용 아두이노
강좌 07 ARM 프로세서용 아두이노강좌 07 ARM 프로세서용 아두이노
강좌 07 ARM 프로세서용 아두이노
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 

Similaire à The Anatomy Of A Performance Audit

BigQuery case study in Groovenauts & Dive into the DataflowJavaSDK
BigQuery case study in Groovenauts & Dive into the DataflowJavaSDKBigQuery case study in Groovenauts & Dive into the DataflowJavaSDK
BigQuery case study in Groovenauts & Dive into the DataflowJavaSDKnagachika t
 
Ichiba Bamboo Users Meetng #1
Ichiba Bamboo Users Meetng #1Ichiba Bamboo Users Meetng #1
Ichiba Bamboo Users Meetng #1Takahiro Yamaki
 
SFO15-110: Toolchain Collaboration
SFO15-110: Toolchain CollaborationSFO15-110: Toolchain Collaboration
SFO15-110: Toolchain CollaborationLinaro
 
Graph processing at scale using spark & graph frames
Graph processing at scale using spark & graph framesGraph processing at scale using spark & graph frames
Graph processing at scale using spark & graph framesRon Barabash
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing selfChen-Tien Tsai
 
Sakai Technical Future Musings
Sakai Technical Future MusingsSakai Technical Future Musings
Sakai Technical Future MusingsCharles Severance
 
Fluent 2018: When third parties stop being polite... and start getting real
Fluent 2018: When third parties stop being polite... and start getting realFluent 2018: When third parties stop being polite... and start getting real
Fluent 2018: When third parties stop being polite... and start getting realAkamai Developers & Admins
 
When Third Parties Stop Being Polite... and Start Getting Real
When Third Parties Stop Being Polite... and Start Getting RealWhen Third Parties Stop Being Polite... and Start Getting Real
When Third Parties Stop Being Polite... and Start Getting RealNicholas Jansma
 
When third parties stop being polite... and start getting real
When third parties stop being polite... and start getting realWhen third parties stop being polite... and start getting real
When third parties stop being polite... and start getting realCharles Vazac
 
How to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineHow to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineElasTest Project
 
Tom Bennet – BrightonSEO April 2016: Site Speed for content Marketers
Tom Bennet – BrightonSEO April 2016: Site Speed for content Marketers Tom Bennet – BrightonSEO April 2016: Site Speed for content Marketers
Tom Bennet – BrightonSEO April 2016: Site Speed for content Marketers Authoritas
 
Managing e commerce systems codebase with git
Managing e commerce systems codebase with gitManaging e commerce systems codebase with git
Managing e commerce systems codebase with gitBruno Ricardo Siqueira
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Bruno Capuano
 
[29-05-2023] All Brands Audit & Solution performances.pptx
[29-05-2023] All Brands Audit & Solution performances.pptx[29-05-2023] All Brands Audit & Solution performances.pptx
[29-05-2023] All Brands Audit & Solution performances.pptxrahmathidayat471220
 
Server Development Workflow For PicCollage
Server Development Workflow For PicCollageServer Development Workflow For PicCollage
Server Development Workflow For PicCollageLin Jen-Shin
 
Optimizing a React application for Core Web Vitals
Optimizing a React application for Core Web VitalsOptimizing a React application for Core Web Vitals
Optimizing a React application for Core Web VitalsJuan Picado
 

Similaire à The Anatomy Of A Performance Audit (20)

Git 1
Git 1Git 1
Git 1
 
BigQuery case study in Groovenauts & Dive into the DataflowJavaSDK
BigQuery case study in Groovenauts & Dive into the DataflowJavaSDKBigQuery case study in Groovenauts & Dive into the DataflowJavaSDK
BigQuery case study in Groovenauts & Dive into the DataflowJavaSDK
 
Ichiba Bamboo Users Meetng #1
Ichiba Bamboo Users Meetng #1Ichiba Bamboo Users Meetng #1
Ichiba Bamboo Users Meetng #1
 
SFO15-110: Toolchain Collaboration
SFO15-110: Toolchain CollaborationSFO15-110: Toolchain Collaboration
SFO15-110: Toolchain Collaboration
 
Graph processing at scale using spark & graph frames
Graph processing at scale using spark & graph framesGraph processing at scale using spark & graph frames
Graph processing at scale using spark & graph frames
 
Ultimate Git Workflow - Seoul 2015
Ultimate Git Workflow - Seoul 2015Ultimate Git Workflow - Seoul 2015
Ultimate Git Workflow - Seoul 2015
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
 
Sakai Technical Future Musings
Sakai Technical Future MusingsSakai Technical Future Musings
Sakai Technical Future Musings
 
Web Technology Part 2
Web Technology Part 2Web Technology Part 2
Web Technology Part 2
 
Fluent 2018: When third parties stop being polite... and start getting real
Fluent 2018: When third parties stop being polite... and start getting realFluent 2018: When third parties stop being polite... and start getting real
Fluent 2018: When third parties stop being polite... and start getting real
 
When Third Parties Stop Being Polite... and Start Getting Real
When Third Parties Stop Being Polite... and Start Getting RealWhen Third Parties Stop Being Polite... and Start Getting Real
When Third Parties Stop Being Polite... and Start Getting Real
 
When third parties stop being polite... and start getting real
When third parties stop being polite... and start getting realWhen third parties stop being polite... and start getting real
When third parties stop being polite... and start getting real
 
How to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineHow to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipeline
 
Tom Bennet – BrightonSEO April 2016: Site Speed for content Marketers
Tom Bennet – BrightonSEO April 2016: Site Speed for content Marketers Tom Bennet – BrightonSEO April 2016: Site Speed for content Marketers
Tom Bennet – BrightonSEO April 2016: Site Speed for content Marketers
 
Managing e commerce systems codebase with git
Managing e commerce systems codebase with gitManaging e commerce systems codebase with git
Managing e commerce systems codebase with git
 
Lit there be light
Lit there be lightLit there be light
Lit there be light
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?
 
[29-05-2023] All Brands Audit & Solution performances.pptx
[29-05-2023] All Brands Audit & Solution performances.pptx[29-05-2023] All Brands Audit & Solution performances.pptx
[29-05-2023] All Brands Audit & Solution performances.pptx
 
Server Development Workflow For PicCollage
Server Development Workflow For PicCollageServer Development Workflow For PicCollage
Server Development Workflow For PicCollage
 
Optimizing a React application for Core Web Vitals
Optimizing a React application for Core Web VitalsOptimizing a React application for Core Web Vitals
Optimizing a React application for Core Web Vitals
 

Dernier

SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxCHAIRMAN M
 
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdfALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdfMadan Karki
 
Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemSampad Kar
 
Introduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of ArduinoIntroduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of ArduinoAbhimanyu Sangale
 
Supermarket billing system project report..pdf
Supermarket billing system project report..pdfSupermarket billing system project report..pdf
Supermarket billing system project report..pdfKamal Acharya
 
Piping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdfPiping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdfAshrafRagab14
 
Theory for How to calculation capacitor bank
Theory for How to calculation capacitor bankTheory for How to calculation capacitor bank
Theory for How to calculation capacitor banktawat puangthong
 
Introduction to Heat Exchangers: Principle, Types and Applications
Introduction to Heat Exchangers: Principle, Types and ApplicationsIntroduction to Heat Exchangers: Principle, Types and Applications
Introduction to Heat Exchangers: Principle, Types and ApplicationsKineticEngineeringCo
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.MdManikurRahman
 
Low rpm Generator for efficient energy harnessing from a two stage wind turbine
Low rpm Generator for efficient energy harnessing from a two stage wind turbineLow rpm Generator for efficient energy harnessing from a two stage wind turbine
Low rpm Generator for efficient energy harnessing from a two stage wind turbineAftabkhan575376
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdfKamal Acharya
 
Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message QueuesLinux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message QueuesRashidFaridChishti
 
Quiz application system project report..pdf
Quiz application system project report..pdfQuiz application system project report..pdf
Quiz application system project report..pdfKamal Acharya
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashidFaiyazSheikh
 
Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2T.D. Shashikala
 
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...Prakhyath Rai
 
Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdfKamal Acharya
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfJNTUA
 
Intelligent Agents, A discovery on How A Rational Agent Acts
Intelligent Agents, A discovery on How A Rational Agent ActsIntelligent Agents, A discovery on How A Rational Agent Acts
Intelligent Agents, A discovery on How A Rational Agent ActsSheetal Jain
 
Introduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AIIntroduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AISheetal Jain
 

Dernier (20)

SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdfALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
 
Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating System
 
Introduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of ArduinoIntroduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of Arduino
 
Supermarket billing system project report..pdf
Supermarket billing system project report..pdfSupermarket billing system project report..pdf
Supermarket billing system project report..pdf
 
Piping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdfPiping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdf
 
Theory for How to calculation capacitor bank
Theory for How to calculation capacitor bankTheory for How to calculation capacitor bank
Theory for How to calculation capacitor bank
 
Introduction to Heat Exchangers: Principle, Types and Applications
Introduction to Heat Exchangers: Principle, Types and ApplicationsIntroduction to Heat Exchangers: Principle, Types and Applications
Introduction to Heat Exchangers: Principle, Types and Applications
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.
 
Low rpm Generator for efficient energy harnessing from a two stage wind turbine
Low rpm Generator for efficient energy harnessing from a two stage wind turbineLow rpm Generator for efficient energy harnessing from a two stage wind turbine
Low rpm Generator for efficient energy harnessing from a two stage wind turbine
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdf
 
Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message QueuesLinux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
 
Quiz application system project report..pdf
Quiz application system project report..pdfQuiz application system project report..pdf
Quiz application system project report..pdf
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded Systems
 
Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2
 
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...
 
Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdf
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
Intelligent Agents, A discovery on How A Rational Agent Acts
Intelligent Agents, A discovery on How A Rational Agent ActsIntelligent Agents, A discovery on How A Rational Agent Acts
Intelligent Agents, A discovery on How A Rational Agent Acts
 
Introduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AIIntroduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AI
 

The Anatomy Of A Performance Audit

Notes de l'éditeur

  1. I’m excited to talk about a key reason why people love Gatsby: fast sites. "In fifteen minutes, I'm going to share with you enough information to get started with a performance audit, we've done dozens of these at Gatsby."
  2. The tricky thing is that performance isn’t just about making your site fast, it’s about keeping it fast. That means putting the right processes in place at your organization. In other words, performance is both a technical challenge and a people challenge.
  3. The tricky thing is that performance isn’t just about making your site fast, it’s about keeping it fast. That means putting the right processes in place at your organization. In other words, performance is both a technical challenge and a people challenge.
  4. What Addy’s saying is that performance work without organizational basis in place will feel like this. “[After] improving performance, metrics often rapidly regress once [teams] return to feature development.” -- Addy Osmani, Web Performance Lead, Google “When companies put in the work to improve performance, perf metrics will often rapidly regress once they return to feature development.”
  5. Okay, so a couple things about this talk. Also, this talk is accompanied by a new piece of documentation in the Performance section. If you’re curious to dive deeper into any of the topics I’ll be covering, that doc is a great place to star So let’s talk about what a performance process looks like. The good news is that it’s simpler than you might think.
  6. Third, watch the numbers. Performance gains -- and regressions -- are sometimes unexpectedly large. You could improve performance 10 points by eliminating one script; or reduce it 10 points by accidentally pulling in extra JavaScript. Quantify so you know what moves the needle.
  7. So let’s talk about what a performance process looks like. The good news is that it’s simpler than you might think.
  8. First, choose a testing tools. These are both great choices. Lighthouse tends to be seen as more "canonical". Webpagetest tends to be seen as more precise.
  9. Second, monitor performance on a per-commit, per-PR basis to flag regressions. Gatsby Cloud has Lighthouse performance reports built into its CI/CD. Alternately, use a third-party service -- there are tons of great options.
  10. Third, watch the numbers. Performance gains -- and regressions -- are sometimes unexpectedly large. You could improve performance 10 points by eliminating one script; or reduce it 10 points by accidentally pulling in extra JavaScript. Quantify so you know what moves the needle.
  11. Okay, so you’ve got your performance process in place. Now time to get down to improving performance.
  12. Gatsby makes your sites fast by default. But there are lots of things you can do that will still make it less fast than it could be. We’re going to talk today about how to improve performance by finding and fixing those issues. This is a great quote by Kyle.
  13. This is one way to think about performance. All performance work is telling your user’s browser how to do less work
  14. Fundamentally there are five things that your browser is doing, after it reads the initial HTML. “These are the main that we’ve seen from Gatsby sites” ← use this language to frame things. Gatsby does a ton of things to optimize -- both inherent in the framework as well as a number of plugins -- Each thing the browser does is something you can optimize.
  15. Typically you’re going to get the most impact from tackling the first three. But we’re going to
  16. Typically you’re going to get the most impact from tackling the first three. But you won’t know for sure until you run a report. But which one of them is most important? That’s where you run your audit report. Let’s dive into a audit quickly.
  17. Let’s talk about addressing third-party scripts.
  18. Split out into a couple of slides, add screenshots, talk track from https://github.com/gatsbyjs/gatsby/pull/29373/files#diff-9247dd003bf5e2c2484bc03c00563897b16e095ec6d6682c997951ba1b78f654R57
  19. Split out into a couple of slides, add screenshots, talk track from https://github.com/gatsbyjs/gatsby/pull/29373/files#diff-9247dd003bf5e2c2484bc03c00563897b16e095ec6d6682c997951ba1b78f654R57
  20. 3rd party scripts are a black box for most developers. To improve things, you have to look into the box.
  21. The first thing you should do is understand what’s going on.
  22. After you have a sense for the impact of each script and all scripts, you have a number of options to explore. Maybe there’s a high-cost script that you can cleverly eliminate by using a system you already use to send the data marketing needs. Maybe one script was only being left by someone who left last last month, and you can get rid of it.
  23. Split out into a couple of slides, add screenshots, talk track from https://github.com/gatsbyjs/gatsby/pull/29373/files#diff-9247dd003bf5e2c2484bc03c00563897b16e095ec6d6682c997951ba1b78f654R57
  24. This is the plugin output for one of our builds on gatsbyjs.com. Seeing something like this can be a bit intimidating, so I’ll break it down here.
  25. Looking at the naming structure, you can identify several “application” level chunks shared between all pages (Note: This is a pretty healthy bundle)
  26. You can also see chunks that are specific to the particular “template” used to generate this page (Note: This is a pretty healthy bundle)
  27. Once you’ve done
  28. Laurie just gave a great talk on Gatsby image, so this is most of it! Go watch her talk and implement Gatsby image if you haven’t already!
  29. Split out into a couple of slides, add screenshots, talk track from https://github.com/gatsbyjs/gatsby/pull/29373/files#diff-9247dd003bf5e2c2484bc03c00563897b16e095ec6d6682c997951ba1b78f654R57
  30. Split out into a couple of slides, add screenshots, talk track from https://github.com/gatsbyjs/gatsby/pull/29373/files#diff-9247dd003bf5e2c2484bc03c00563897b16e095ec6d6682c997951ba1b78f654R57
  31. Slim down from https://github.com/gatsbyjs/gatsby/pull/29373/files#diff-9247dd003bf5e2c2484bc03c00563897b16e095ec6d6682c997951ba1b78f654R139
  32. This is the Coverage Drawer -- a tab you can find in Chrome Developer Tools -- for the homepage of an e-commerce site that is using Gatsby. You can see their homepage is roughly 300 kilobytes, around 80% of which isn’t being used. This is because they’re pulling in a lot of CSS that isn’t being used. They’re working on refactoring and modularizing their CSS using CSS modules. Slim down from https://github.com/gatsbyjs/gatsby/pull/29373/files#diff-9247dd003bf5e2c2484bc03c00563897b16e095ec6d6682c997951ba1b78f654R139
  33. This is the Coverage Drawer -- a tab you can find in Chrome Developer Tools -- for the homepage of an e-commerce site that is using Gatsby. You can see their homepage is roughly 300 kilobytes, around 80% of which isn’t being used. This is because they’re pulling in a lot of CSS that isn’t being used. They’re working on refactoring and modularizing their CSS using CSS modules. Slim down from https://github.com/gatsbyjs/gatsby/pull/29373/files#diff-9247dd003bf5e2c2484bc03c00563897b16e095ec6d6682c997951ba1b78f654R139
  34. This is the Coverage Drawer -- a tab you can find in Chrome Developer Tools -- for the homepage of an e-commerce site that is using Gatsby. You can see their homepage is roughly 300 kilobytes, around 80% of which isn’t being used. This is because they’re pulling in a lot of CSS that isn’t being used. They’re working on refactoring and modularizing their CSS using CSS modules. Slim down from https://github.com/gatsbyjs/gatsby/pull/29373/files#diff-9247dd003bf5e2c2484bc03c00563897b16e095ec6d6682c997951ba1b78f654R139
  35. This is the Coverage Drawer -- a tab you can find in Chrome Developer Tools -- for the homepage of an e-commerce site that is using Gatsby. You can see their homepage is roughly 300 kilobytes, around 80% of which isn’t being used. This is because they’re pulling in a lot of CSS that isn’t being used. They’re working on refactoring and modularizing their CSS using CSS modules. Slim down from https://github.com/gatsbyjs/gatsby/pull/29373/files#diff-9247dd003bf5e2c2484bc03c00563897b16e095ec6d6682c997951ba1b78f654R139
  36. This is the Coverage Drawer -- a tab you can find in Chrome Developer Tools -- for the homepage of an e-commerce site that is using Gatsby. You can see their homepage is roughly 300 kilobytes, around 80% of which isn’t being used. This is because they’re pulling in a lot of CSS that isn’t being used. They’re working on refactoring and modularizing their CSS using CSS modules. Slim down from https://github.com/gatsbyjs/gatsby/pull/29373/files#diff-9247dd003bf5e2c2484bc03c00563897b16e095ec6d6682c997951ba1b78f654R139
  37. This is the Coverage Drawer -- a tab you can find in Chrome Developer Tools -- for the homepage of an e-commerce site that is using Gatsby. You can see their homepage is roughly 300 kilobytes, around 80% of which isn’t being used. This is because they’re pulling in a lot of CSS that isn’t being used. They’re working on refactoring and modularizing their CSS using CSS modules. Slim down from https://github.com/gatsbyjs/gatsby/pull/29373/files#diff-9247dd003bf5e2c2484bc03c00563897b16e095ec6d6682c997951ba1b78f654R139
  38. The tricky thing is that performance isn’t just about making your site fast, it’s about keeping it fast. That means putting the right processes in place at your organization. In other words, performance is both a technical challenge and a people challenge.
  39. The tricky thing is that performance isn’t just about making your site fast, it’s about keeping it fast. That means putting the right processes in place at your organization. In other words, performance is both a technical challenge and a people challenge.
  40. The tricky thing is that performance isn’t just about making your site fast, it’s about keeping it fast. That means putting the right processes in place at your organization. In other words, performance is both a technical challenge and a people challenge.