SlideShare a Scribd company logo
1 COPYRIGHT © 2021 TECHDIVISION
Analyzing Web Performance
Issues for React Applications
2
2 COPYRIGHT © 2021 TECHDIVISION
Lars Röttig
● Senior Software Engineer
● Maintainer Magento
Community Engineering
Team
3 COPYRIGHT © 2021 TECHDIVISION
Let's start our next project with React
4 COPYRIGHT © 2021 TECHDIVISION
Why is our project so slow ?
5 COPYRIGHT © 2021 TECHDIVISION
Core Web Vitals
Source : https://web.dev/vitals
6 COPYRIGHT © 2021 TECHDIVISION
Set up clean profiles for testing.
https://www.debugbear.com/blog/2020-chrome-extension-performance-report
7 COPYRIGHT © 2021 TECHDIVISION
Lighthouse Chrome
https://github.com/GoogleChrome/lighthouse#using-lighthouse-in-chrome-devtools
8 COPYRIGHT © 2021 TECHDIVISION
Run web profiler on
Live site
https://www.webpagetest.org/
9 COPYRIGHT © 2021 TECHDIVISION
State Colocation DEMO
https://github.com/larsroettig/react-performance-workshop
10 COPYRIGHT © 2021 TECHDIVISION
https://twitter.com/meijer_s/status/1331204422404280323/photo/1
Where to pute State
11 COPYRIGHT © 2021 TECHDIVISION
Summary
● Use lazy import (Code splitting)
● Use memoization with care
○ useMemo
○ useCallback
○ When to useMemo and useCallback
● For GraphQL libraries could beneficial
○ Apollo GraphQL
○ React Query
● Setup Lighthouse CLI for performance
testing
● select less 3rd libraries (Bundle size!!!)
● Run https://www.webpagetest.org/
regulary after each sprint
12 COPYRIGHT © 2021 TECHDIVISION
Web Performance Demo
13 COPYRIGHT © 2021 TECHDIVISION
Summary
● Use loading skeleton
● Use lazy loading components and images
○ Modern via <img loading=lazy>
● Set height and width for images
https://github.com/larsroettig/react-performance-workshop
● Use modern image formats such as WEBP
for faster image loading.
● Use srcset to load the most optimal image
for the clients screen size.
● Use Server Side Rendering for SPA
○ SSR Architecture in React 18
○ React 18 Demo
14 COPYRIGHT © 2021 TECHDIVISION
BE STRONG. BE REAL. BE DIGITAL.
TechDivision GmbH
Tel. +49 8031 22105-70
Fax +49 8031 221057-22
info@techdivision.com
www.techdivision.com
Kolbermoor
An der Alten Spinnerei 2 a
83059 Kolbermoor
München
Balanstraße 73, Haus 8
81541 MÜNCHEN
Hamburg
Große Elbstraße 281
22767 Hamburg
Leipzig
Käthe-Kollwitz-Straße 60
04109 Leipzig
Wien
Heiligenstädter Lände 29
1190 Wien
Zürich
Max-Högger-Strasse 6
8048 Zürich

More Related Content

What's hot (20)

PDF
MuleSoft meetup__houston #13
Jim Andrews
 
PPSX
Pipeline de deploy com ASP.NET Core e VSTS
Jaqueline Ramos
 
PPTX
CI/CD with Bitbucket pipelines
Theophilus Omoregbee
 
PDF
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
Angel Alberici
 
PPTX
Extreact 6.6 Launch
Sandeep Adwankar
 
PDF
Guiding Diffy to the Enterprise land
Dariusz Łuksza
 
PDF
RIA front-ends: Flex, GWT integration in Nuxeo
Nuxeo
 
PDF
UGent Django Infrastructure
kevinvw
 
PDF
Crossing the Streams! Rollout Strategies to Keep Your Users Happy!
VMware Tanzu
 
PPT
Impact Of A Cms Framework Change - Holland Open Netherlands
Wilco Jansen
 
PPTX
C2M - App design
rohanratnaparkhi
 
PDF
Evolution of GitLab Frontend
Fatih Acet
 
PDF
TechEvent OpenShift for Developers
Trivadis
 
PPTX
Efficient Code Management
Rachel Whitton
 
PPTX
GWT Quick Start
Guo Albert
 
PDF
MuleSoft London Community September 2020 - Project Vita
Pace Integration
 
PDF
WebKit for Wayland (Web Engines Hackfest 2014)
Igalia
 
PPTX
Understanding GitFlow by Ian Vizarra
vzrx23
 
PPTX
Mulesoft AnyyPoint Monitoring for Hybrid Deployment
pruthviraj krishnam
 
PPTX
Presentation on octobercms
Ramesh Adhikari
 
MuleSoft meetup__houston #13
Jim Andrews
 
Pipeline de deploy com ASP.NET Core e VSTS
Jaqueline Ramos
 
CI/CD with Bitbucket pipelines
Theophilus Omoregbee
 
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
Angel Alberici
 
Extreact 6.6 Launch
Sandeep Adwankar
 
Guiding Diffy to the Enterprise land
Dariusz Łuksza
 
RIA front-ends: Flex, GWT integration in Nuxeo
Nuxeo
 
UGent Django Infrastructure
kevinvw
 
Crossing the Streams! Rollout Strategies to Keep Your Users Happy!
VMware Tanzu
 
Impact Of A Cms Framework Change - Holland Open Netherlands
Wilco Jansen
 
C2M - App design
rohanratnaparkhi
 
Evolution of GitLab Frontend
Fatih Acet
 
TechEvent OpenShift for Developers
Trivadis
 
Efficient Code Management
Rachel Whitton
 
GWT Quick Start
Guo Albert
 
MuleSoft London Community September 2020 - Project Vita
Pace Integration
 
WebKit for Wayland (Web Engines Hackfest 2014)
Igalia
 
Understanding GitFlow by Ian Vizarra
vzrx23
 
Mulesoft AnyyPoint Monitoring for Hybrid Deployment
pruthviraj krishnam
 
Presentation on octobercms
Ramesh Adhikari
 

Similar to React and Web Performance (20)

PDF
Best Practices for Building Scalable and Performant React Applications
RajasreePothula3
 
PDF
Creating Hyper Performant Web Apps with React
Jp DeVries
 
PDF
React performance
Derek Willian Stavis
 
PPTX
Web Performance & Latest in React
Talentica Software
 
PDF
Top 5 React Performance Optimization Techniques in 2023
ultroNeous Technologies | Best Web App Development Company
 
PDF
How to increase the ui performance of apps designed using react
MoonTechnolabsPvtLtd
 
PPTX
Top 10 Techniques For React Performance Optimization in 2022.pptx
BOSC Tech Labs
 
PPTX
Shining a light on performance (js meetup)
Yoav Niran
 
PDF
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
RobertThorson2
 
PDF
A journey through a slow react app.
pksjce
 
PDF
The Journey of a Pixel in a React Application
Shem Magnezi
 
PDF
Why React Native Developers Are Key to High-Performance Mobile Apps
Shiv Technolabs Pvt. Ltd.
 
PPTX
intro to react| React: dynamic UIs, component-based, virtual DOM, JSX, effici...
IbadUddin4
 
PDF
Open data for good
Marco Liberati
 
PPTX
This Is the ppt of How the react js work in the dealy life
AmanKoli6
 
PPTX
React Tune-up - ReactLive.nl
Yoav Niran
 
PDF
Isomorphic React Applications: Performance And Scalability
Denis Izmaylov
 
PDF
React js
Rajesh Kolla
 
PPTX
React & redux
Cédric Hartland
 
PDF
Building High-Performance Force.com Applications in React
Salesforce Developers
 
Best Practices for Building Scalable and Performant React Applications
RajasreePothula3
 
Creating Hyper Performant Web Apps with React
Jp DeVries
 
React performance
Derek Willian Stavis
 
Web Performance & Latest in React
Talentica Software
 
Top 5 React Performance Optimization Techniques in 2023
ultroNeous Technologies | Best Web App Development Company
 
How to increase the ui performance of apps designed using react
MoonTechnolabsPvtLtd
 
Top 10 Techniques For React Performance Optimization in 2022.pptx
BOSC Tech Labs
 
Shining a light on performance (js meetup)
Yoav Niran
 
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
RobertThorson2
 
A journey through a slow react app.
pksjce
 
The Journey of a Pixel in a React Application
Shem Magnezi
 
Why React Native Developers Are Key to High-Performance Mobile Apps
Shiv Technolabs Pvt. Ltd.
 
intro to react| React: dynamic UIs, component-based, virtual DOM, JSX, effici...
IbadUddin4
 
Open data for good
Marco Liberati
 
This Is the ppt of How the react js work in the dealy life
AmanKoli6
 
React Tune-up - ReactLive.nl
Yoav Niran
 
Isomorphic React Applications: Performance And Scalability
Denis Izmaylov
 
React js
Rajesh Kolla
 
React & redux
Cédric Hartland
 
Building High-Performance Force.com Applications in React
Salesforce Developers
 
Ad

Recently uploaded (20)

PDF
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
 
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
PPTX
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
PDF
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
PPTX
The birth and death of Stars - earth and life science
rizellemarieastrolo
 
PDF
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
PPTX
Practical Applications of AI in Local Government
OnBoard
 
PDF
99 Bottles of Trust on the Wall — Operational Principles for Trust in Cyber C...
treyka
 
PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
PDF
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
PDF
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
PDF
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
DOCX
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
PPTX
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
PDF
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
 
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
The birth and death of Stars - earth and life science
rizellemarieastrolo
 
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
Practical Applications of AI in Local Government
OnBoard
 
99 Bottles of Trust on the Wall — Operational Principles for Trust in Cyber C...
treyka
 
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
Ad

React and Web Performance

  • 1. 1 COPYRIGHT © 2021 TECHDIVISION Analyzing Web Performance Issues for React Applications
  • 2. 2 2 COPYRIGHT © 2021 TECHDIVISION Lars Röttig ● Senior Software Engineer ● Maintainer Magento Community Engineering Team
  • 3. 3 COPYRIGHT © 2021 TECHDIVISION Let's start our next project with React
  • 4. 4 COPYRIGHT © 2021 TECHDIVISION Why is our project so slow ?
  • 5. 5 COPYRIGHT © 2021 TECHDIVISION Core Web Vitals Source : https://web.dev/vitals
  • 6. 6 COPYRIGHT © 2021 TECHDIVISION Set up clean profiles for testing. https://www.debugbear.com/blog/2020-chrome-extension-performance-report
  • 7. 7 COPYRIGHT © 2021 TECHDIVISION Lighthouse Chrome https://github.com/GoogleChrome/lighthouse#using-lighthouse-in-chrome-devtools
  • 8. 8 COPYRIGHT © 2021 TECHDIVISION Run web profiler on Live site https://www.webpagetest.org/
  • 9. 9 COPYRIGHT © 2021 TECHDIVISION State Colocation DEMO https://github.com/larsroettig/react-performance-workshop
  • 10. 10 COPYRIGHT © 2021 TECHDIVISION https://twitter.com/meijer_s/status/1331204422404280323/photo/1 Where to pute State
  • 11. 11 COPYRIGHT © 2021 TECHDIVISION Summary ● Use lazy import (Code splitting) ● Use memoization with care ○ useMemo ○ useCallback ○ When to useMemo and useCallback ● For GraphQL libraries could beneficial ○ Apollo GraphQL ○ React Query ● Setup Lighthouse CLI for performance testing ● select less 3rd libraries (Bundle size!!!) ● Run https://www.webpagetest.org/ regulary after each sprint
  • 12. 12 COPYRIGHT © 2021 TECHDIVISION Web Performance Demo
  • 13. 13 COPYRIGHT © 2021 TECHDIVISION Summary ● Use loading skeleton ● Use lazy loading components and images ○ Modern via <img loading=lazy> ● Set height and width for images https://github.com/larsroettig/react-performance-workshop ● Use modern image formats such as WEBP for faster image loading. ● Use srcset to load the most optimal image for the clients screen size. ● Use Server Side Rendering for SPA ○ SSR Architecture in React 18 ○ React 18 Demo
  • 14. 14 COPYRIGHT © 2021 TECHDIVISION BE STRONG. BE REAL. BE DIGITAL. TechDivision GmbH Tel. +49 8031 22105-70 Fax +49 8031 221057-22 [email protected] www.techdivision.com Kolbermoor An der Alten Spinnerei 2 a 83059 Kolbermoor München Balanstraße 73, Haus 8 81541 MÜNCHEN Hamburg Große Elbstraße 281 22767 Hamburg Leipzig Käthe-Kollwitz-Straße 60 04109 Leipzig Wien Heiligenstädter Lände 29 1190 Wien Zürich Max-Högger-Strasse 6 8048 Zürich

Editor's Notes

  • #6: The ( Largest Contentful Paint) metric reports the render time of the largest image or text block visible within the viewport relative to when the page first started loading. CLS is a measure of the largest burst of layout shift A layout shift occurs any time a visible element changes its position from one rendered frame to the next. FID measures the time from when a user first interacts with a page to the time when the browser is actually able to begin processing event handlers in response to that interaction.
  • #7: I have three profiles on Personal all extension enabled Performance/ Incoticotito for Ligthhause React profiling where i have react tools i have enabled
  • #8: Use Cli setup Performance test at starting of project to fritsration later Helps to track if you app loads slower because of a feature implementation
  • #11: Think about where to handle state i don't want to so deep in state handling because own topic
  • #13: I have three profiles on Personal all extension enabled Performance/ Incoticotito for Ligthhause React profiling where i have react tools i have enabled
  • #14: <img loading=lazy> is supported by most popular Chromium-powered browsers (Chrome, Edge, Opera) and Firefox.