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

PPTX
Introduction to MuleSoft
PPTX
Magento PWA Studio extensibility
PDF
React and Web Performance
PPTX
Bhopal mule soft_meetup_17july2021_azuredevopsintegration_mulesoft
PPT
Google Web Toolkit
PPTX
Ahmadabad mule soft_meetup_6march2021_azure_CICD
PPTX
Bhopal mule soft_meetup#2_18sept2021_cloudhubdr_strategy_bestpractices
PPTX
MuleSoft Kochi Meetup #5– Handling Mule Exceptions
Introduction to MuleSoft
Magento PWA Studio extensibility
React and Web Performance
Bhopal mule soft_meetup_17july2021_azuredevopsintegration_mulesoft
Google Web Toolkit
Ahmadabad mule soft_meetup_6march2021_azure_CICD
Bhopal mule soft_meetup#2_18sept2021_cloudhubdr_strategy_bestpractices
MuleSoft Kochi Meetup #5– Handling Mule Exceptions

What's hot (20)

PDF
MuleSoft meetup__houston #13
PPSX
Pipeline de deploy com ASP.NET Core e VSTS
PPTX
CI/CD with Bitbucket pipelines
PDF
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
PPTX
Extreact 6.6 Launch
PDF
Guiding Diffy to the Enterprise land
PDF
RIA front-ends: Flex, GWT integration in Nuxeo
PDF
UGent Django Infrastructure
PDF
Crossing the Streams! Rollout Strategies to Keep Your Users Happy!
PPT
Impact Of A Cms Framework Change - Holland Open Netherlands
PPTX
C2M - App design
PDF
Evolution of GitLab Frontend
PDF
TechEvent OpenShift for Developers
PPTX
Efficient Code Management
PPTX
GWT Quick Start
PDF
MuleSoft London Community September 2020 - Project Vita
PDF
WebKit for Wayland (Web Engines Hackfest 2014)
PPTX
Understanding GitFlow by Ian Vizarra
PPTX
Mulesoft AnyyPoint Monitoring for Hybrid Deployment
PPTX
Presentation on octobercms
MuleSoft meetup__houston #13
Pipeline de deploy com ASP.NET Core e VSTS
CI/CD with Bitbucket pipelines
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
Extreact 6.6 Launch
Guiding Diffy to the Enterprise land
RIA front-ends: Flex, GWT integration in Nuxeo
UGent Django Infrastructure
Crossing the Streams! Rollout Strategies to Keep Your Users Happy!
Impact Of A Cms Framework Change - Holland Open Netherlands
C2M - App design
Evolution of GitLab Frontend
TechEvent OpenShift for Developers
Efficient Code Management
GWT Quick Start
MuleSoft London Community September 2020 - Project Vita
WebKit for Wayland (Web Engines Hackfest 2014)
Understanding GitFlow by Ian Vizarra
Mulesoft AnyyPoint Monitoring for Hybrid Deployment
Presentation on octobercms
Ad

Similar to React and Web Performance (20)

PDF
Best Practices for Building Scalable and Performant React Applications
PDF
Creating Hyper Performant Web Apps with React
PDF
React performance
PPTX
Web Performance & Latest in React
PDF
React DevTools Guide Part 1: Boost Performance, Accessibility & Bundle Effici...
PDF
Top 5 React Performance Optimization Techniques in 2023
PDF
How to increase the ui performance of apps designed using react
PPTX
Top 10 Techniques For React Performance Optimization in 2022.pptx
PPTX
Shining a light on performance (js meetup)
PDF
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
PDF
A journey through a slow react app.
PDF
The Journey of a Pixel in a React Application
PDF
Why React Native Developers Are Key to High-Performance Mobile Apps
PPTX
intro to react| React: dynamic UIs, component-based, virtual DOM, JSX, effici...
PDF
Open data for good
PPTX
This Is the ppt of How the react js work in the dealy life
PPTX
React Tune-up - ReactLive.nl
PDF
Isomorphic React Applications: Performance And Scalability
PDF
React js
PPTX
React & redux
Best Practices for Building Scalable and Performant React Applications
Creating Hyper Performant Web Apps with React
React performance
Web Performance & Latest in React
React DevTools Guide Part 1: Boost Performance, Accessibility & Bundle Effici...
Top 5 React Performance Optimization Techniques in 2023
How to increase the ui performance of apps designed using react
Top 10 Techniques For React Performance Optimization in 2022.pptx
Shining a light on performance (js meetup)
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
A journey through a slow react app.
The Journey of a Pixel in a React Application
Why React Native Developers Are Key to High-Performance Mobile Apps
intro to react| React: dynamic UIs, component-based, virtual DOM, JSX, effici...
Open data for good
This Is the ppt of How the react js work in the dealy life
React Tune-up - ReactLive.nl
Isomorphic React Applications: Performance And Scalability
React js
React & redux
Ad

Recently uploaded (20)

PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Big Data Technologies - Introduction.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Approach and Philosophy of On baking technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Electronic commerce courselecture one. Pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Cloud computing and distributed systems.
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Encapsulation theory and applications.pdf
PDF
Machine learning based COVID-19 study performance prediction
Programs and apps: productivity, graphics, security and other tools
Advanced methodologies resolving dimensionality complications for autism neur...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Reach Out and Touch Someone: Haptics and Empathic Computing
Unlocking AI with Model Context Protocol (MCP)
Big Data Technologies - Introduction.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
MYSQL Presentation for SQL database connectivity
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Dropbox Q2 2025 Financial Results & Investor Presentation
Approach and Philosophy of On baking technology
Network Security Unit 5.pdf for BCA BBA.
Electronic commerce courselecture one. Pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Cloud computing and distributed systems.
“AI and Expert System Decision Support & Business Intelligence Systems”
Encapsulation theory and applications.pdf
Machine learning based COVID-19 study performance prediction

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

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.