Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Designing High Performance React Applications
Search
Sendil Kumar N
June 01, 2022
Programming
1
170
Designing High Performance React Applications
Sendil Kumar N
June 01, 2022
Tweet
Share
More Decks by Sendil Kumar N
See All by Sendil Kumar N
[Heapcon-2023] Building High Performance Web Applications
sendilkumarn
0
91
Building Reactive Microservices with Kotlin & running on Kubernetes
sendilkumarn
0
190
Building Reactive Microservices with JHipster & K8s
sendilkumarn
0
23
Batching, Suspense, and Server Components
sendilkumarn
0
52
DevNexus_Building_with__Zero_Trust_Architecture_Copy.pdf
sendilkumarn
0
63
Lessons Learnt with Visual Testing and Snapshots
sendilkumarn
0
120
Easy Microservices with K8s & Istio
sendilkumarn
0
99
KHipster - Kotlin Hipster
sendilkumarn
0
260
Microservices with JHipster
sendilkumarn
0
89
Other Decks in Programming
See All in Programming
Flutter로 Gemini와 MCP를 활용한 Agentic App 만들기 - 박제창 2025 I/O Extended Seoul
itsmedreamwalker
0
150
Laravel Boost 超入門
fire_arlo
1
130
GUI操作LLMの最新動向: UI-TARSと関連論文紹介
kfujikawa
0
1k
コンテキストエンジニアリング Cursor編
kinopeee
1
710
未来を拓くAI技術〜エージェント開発とAI駆動開発〜
leveragestech
2
180
Nuances on Kubernetes - RubyConf Taiwan 2025
envek
0
190
コーディングエージェント時代のNeovim
key60228
1
100
AI OCR API on Lambdaを Datadogで可視化してみた
nealle
0
180
Microsoft Orleans, Daprのアクターモデルを使い効率的に開発、デプロイを行うためのSekibanの試行錯誤 / Sekiban: Exploring Efficient Development and Deployment with Microsoft Orleans and Dapr Actor Models
tomohisa
0
210
AIでLINEスタンプを作ってみた
eycjur
1
200
AWS Serverless Application Model入門_20250708
smatsuzaki
0
130
新世界の理解
koriym
0
140
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
30
6k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
820
It's Worth the Effort
3n
187
28k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Optimizing for Happiness
mojombo
379
70k
Music & Morning Musume
bryan
46
6.7k
Building Applications with DynamoDB
mza
96
6.6k
Thoughts on Productivity
jonyablonski
69
4.8k
Transcript
@sendilkumarn Designing High Performance React Applications
@sendilkumarn @sendilkumarn
@sendilkumarn @sendilkumarn @sendilkumarn
@sendilkumarn @sendilkumarn https://www.packt.com/product/web-development/b14844-practical-webassembly/ 30PRWEB
@sendilkumarn @sendilkumarn why performance matters?
@sendilkumarn @sendilkumarn 4.42% users drop for every additional second of
load time source
@sendilkumarn @sendilkumarn
@sendilkumarn @sendilkumarn Every 1s improvement increases CR by 2%
@sendilkumarn @sendilkumarn Every 1s improvement increases CR by 2% 10M
= 200K ⏫
@sendilkumarn @sendilkumarn 3-4s Ideal load time source
@sendilkumarn @sendilkumarn ~15s average mobile site load time source
@sendilkumarn @sendilkumarn ⚡ sites = 😄 users
@sendilkumarn @sendilkumarn 😄 users = 📈 CR
@sendilkumarn @sendilkumarn https://web.dev/vitals-business-impact/
@sendilkumarn @sendilkumarn Core Web Vitals
@sendilkumarn @sendilkumarn GET /home TTFB FCP GET /main.js Render (App)
LCP TTI Time To First Byte First Contentful Paint Largest Contentful Paint Time To Interactivity
@sendilkumarn @sendilkumarn Lower is better Source
@sendilkumarn @sendilkumarn Layout Shifts Source
@sendilkumarn @sendilkumarn Lesser Layout Shifts Sooner Time To Interactivity Faster
Largest Contentful Paint
@sendilkumarn @sendilkumarn Agenda Obvious - Things that you know already!
Rendering - Render based on your needs It depends - It actually depends on your usecase Common - Use it everywhere
@sendilkumarn @sendilkumarn Obvious
@sendilkumarn @sendilkumarn Bundling & Splitting
@sendilkumarn @sendilkumarn GET /home GET /main.js Render (App) Browser has
to wait until the main.js is downloaded fully. Smaller the size better the performance
@sendilkumarn @sendilkumarn Route based splitting Component based splitting
@sendilkumarn @sendilkumarn 100 - 170 KB is the ideal size
for the JavaScript size Budget JavaScript
@sendilkumarn @sendilkumarn Analyse JavaScript bundle size & Optimise
@sendilkumarn @sendilkumarn Avoid Data mutation
@sendilkumarn @sendilkumarn Every mutation causes re-rendering
@sendilkumarn @sendilkumarn Every re-rendering causes performance impact
@sendilkumarn @sendilkumarn Immutability
@sendilkumarn @sendilkumarn Reconciliation
@sendilkumarn @sendilkumarn
@sendilkumarn @sendilkumarn SCU SCU SCU SCU SCU SCU SCU
@sendilkumarn @sendilkumarn VDOMeq VDOMeq VDOMeq
@sendilkumarn @sendilkumarn
@sendilkumarn @sendilkumarn Architect your code / application such that re-rendering
affects lesser components in your react tree.
@sendilkumarn @sendilkumarn Virtualization
@sendilkumarn @sendilkumarn viewport
@sendilkumarn @sendilkumarn Rendered Rendered Rendered Rendered Rendered Not Rendered Not
Rendered
@sendilkumarn @sendilkumarn Source 100x
@sendilkumarn @sendilkumarn React 18 - Automatic Batching
@sendilkumarn @sendilkumarn Batching is when React groups multiple state updates
into a single re-render for a better performance
@sendilkumarn @sendilkumarn Re-rendering happens here 17
@sendilkumarn @sendilkumarn Re-rendering happens here Re-rendering happens here 17
@sendilkumarn @sendilkumarn Re-rendering happens here 18
@sendilkumarn @sendilkumarn •Better performance •No unnecessary re-renders •Consistent User Experience
•No weird intermediate state
@sendilkumarn @sendilkumarn Obvious 🔻 bundle size 🔻 re-rendering 🔻 updates
✅ virtualize ✅ React 18
@sendilkumarn @sendilkumarn Deliver only what is used
@sendilkumarn @sendilkumarn Rendering
@sendilkumarn @sendilkumarn Client Side Rendering (CSR) Static Rendering
@sendilkumarn @sendilkumarn JS CSS HTML
@sendilkumarn @sendilkumarn
@sendilkumarn @sendilkumarn 👍 Fast Time To First Byte 👍 Good
for static content 👎 Performance depends on the client 👎 TTI is high 👎 Bundle size decreases your site performance
@sendilkumarn @sendilkumarn Server Side Rendering (SSR)
@sendilkumarn @sendilkumarn SSR generates HTML from react components in server
@sendilkumarn @sendilkumarn
@sendilkumarn @sendilkumarn Loading Starts…
@sendilkumarn @sendilkumarn Server Fetches Data Renders HTML
@sendilkumarn @sendilkumarn Client receives HTML Only HTML No Interactions
@sendilkumarn @sendilkumarn Hydrate
@sendilkumarn @sendilkumarn Finish Fetching Finish Loading Finish Hydrate Interact
@sendilkumarn @sendilkumarn 👍 Fast TTI 👍 Good for dynamic content
👍 Performance doesn’t depend on the client 👎 TTFB is high 👎 High server cost
@sendilkumarn @sendilkumarn SSR CSR Dynamic Static Balance as you need
@sendilkumarn @sendilkumarn React 18 - Suspense in SSR
@sendilkumarn @sendilkumarn <suspense /> lets you wait for code to
load
@sendilkumarn @sendilkumarn <Layout> <Header /> <Sidebar /> <Main> <Post />
<Comments /> </Main> <Footer /> </Layout>
@sendilkumarn @sendilkumarn <Layout> <Header /> <Sidebar /> <Main> <Post />
<Comments /> </Main> <Footer /> </Layout>
@sendilkumarn @sendilkumarn <Layout> <Header /> <Sidebar /> <Main> <Post />
<Comments /> </Main> <Footer /> </Layout> Server Side Render
@sendilkumarn @sendilkumarn <Layout> <Header /> <Sidebar /> <Main> <Post />
<Comments /> </Main> <Footer /> </Layout> fetchPosts().then(post => { fetchCommentForPost(…) });
@sendilkumarn @sendilkumarn <Layout> <Header /> <Sidebar /> <Main> <Post />
<Suspense> <Comments /> </Suspense> </Main> <Footer /> </Layout> fetchPosts(); fetchCommentsForPost();
@sendilkumarn @sendilkumarn Finish Fetching Finish Loading Finish Hydrate Interact
@sendilkumarn @sendilkumarn Rendering
@sendilkumarn @sendilkumarn Islands Architecture Photo source Rendering
@sendilkumarn @sendilkumarn
@sendilkumarn @sendilkumarn It depends
@sendilkumarn @sendilkumarn React 18 - Server Components
@sendilkumarn @sendilkumarn Server Components are React components but they will
run on server
@sendilkumarn @sendilkumarn ⚠ Not yet production ready ⚠
@sendilkumarn @sendilkumarn *.server.js *.client.js *.js
@sendilkumarn @sendilkumarn Server Closer & Faster
@sendilkumarn @sendilkumarn blog.js 229 kb 954 kb 32 kb 1215
kb Calling DB from the client Calculates them on the client
@sendilkumarn @sendilkumarn blog.server.js Handled in server SSR HTML
@sendilkumarn @sendilkumarn 👍 No huge dependencies 👍 Props are allowed
👍 Can import *.client.js 👎 No interactivity 👎 No State / user events
@sendilkumarn @sendilkumarn Use Technologies as needed
@sendilkumarn @sendilkumarn GraphQL Redux Css in JS Lodash moment.js ……………
@sendilkumarn @sendilkumarn Limit component size
@sendilkumarn @sendilkumarn
@sendilkumarn @sendilkumarn
@sendilkumarn @sendilkumarn
@sendilkumarn @sendilkumarn VDOM eq - takes longer time Too many
updates Too complex to maintain
@sendilkumarn @sendilkumarn
@sendilkumarn @sendilkumarn Common
@sendilkumarn @sendilkumarn Cache is your friend
@sendilkumarn @sendilkumarn Edge Cache
@sendilkumarn @sendilkumarn
@sendilkumarn @sendilkumarn Image Lazy Loading
@sendilkumarn @sendilkumarn <img src=“image.png” loading=“lazy” alt=“…” /> <img src=“image.png” alt=“…”
/> <img src=“image.png” loading=“eager” alt=“…” /> <img src=“image.png” loading=“auto” alt=“…” />
@sendilkumarn @sendilkumarn Apple Macbook Site 17.5Mb only images
@sendilkumarn @sendilkumarn Source
@sendilkumarn @sendilkumarn Inline critical ; defer non-critical
@sendilkumarn @sendilkumarn Remove unused resources
@sendilkumarn @sendilkumarn
@sendilkumarn @sendilkumarn Preload Lazy load
@sendilkumarn @sendilkumarn ChromeVille DNS Land Web World DataVille Folderz hAPPy
Load HTML HTML JS CSS Parse CSS & JS Waits to fi nish download Parse & Execute Critical @sendilkumarn
@sendilkumarn @sendilkumarn Minimize roundtrips
@sendilkumarn @sendilkumarn ChromeVille DNS Land Web World DataVille Folderz hAPPy
HTML JS CSS Load HTML Parse CSS & JS Waits to fi nish download Parse & Execute APIs @sendilkumarn
@sendilkumarn @sendilkumarn Minimize roundtrips (APIs)
@sendilkumarn @sendilkumarn ChromeVille DNS Land Web World DataVille Folderz hAPPy
HTML JS CSS Load HTML Parse CSS & JS Waits to fi nish download Parse & Execute APIs SSR @sendilkumarn
@sendilkumarn @sendilkumarn React Profilers
@sendilkumarn @sendilkumarn Performance Optimisation is an ongoing process
@sendilkumarn @sendilkumarn Measure! Optimize!! Measure!!!
@sendilkumarn @sendilkumarn Questions
@sendilkumarn @sendilkumarn Thanks