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
Layout Repaint & The Lessons Learned
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Irfan Maulana
January 03, 2022
Programming
0
430
Layout Repaint & The Lessons Learned
The lessons learned from the real case we face related with layout repainting problem on the web
Irfan Maulana
January 03, 2022
Tweet
Share
More Decks by Irfan Maulana
See All by Irfan Maulana
Panduan untuk mempublikasikan kode ke publik
mazipan
0
150
Mengukur dan meningkatkan performa website
mazipan
1
240
Testing JavaScript
mazipan
0
180
Membuat Website Zaman Sekarang
mazipan
0
530
Kinerja Web 101 - Edisi 2022
mazipan
1
490
Bagaimana implementasi mockup design
mazipan
0
540
Memulai karir sebagai web programmer
mazipan
0
760
Membuat laporan kecepatan web untuk blog
mazipan
0
550
Bongkar Dapur Webnya #PHPID-OL
mazipan
0
540
Other Decks in Programming
See All in Programming
AI活用のコスパを最大化する方法
ochtum
0
230
Claude Codeログ基盤の構築
giginet
PRO
7
3.5k
SourceGeneratorのマーカー属性問題について
htkym
0
200
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
160
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
120
Claude Code Skill入門
mayahoney
0
400
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
570
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
260
Codex の「自走力」を高める
yorifuji
0
1.2k
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
330
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
0
130
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
650
Featured
See All Featured
WENDY [Excerpt]
tessaabrams
9
36k
The Limits of Empathy - UXLibs8
cassininazir
1
270
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
400
From π to Pie charts
rasagy
0
150
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
Thoughts on Productivity
jonyablonski
75
5.1k
Utilizing Notion as your number one productivity tool
mfonobong
4
260
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Become a Pro
speakerdeck
PRO
31
5.9k
Transcript
Layout Repaint & The Lessons Learned Irfan Maulana Principal Engineer
Web Platform, Tokopedia Semarang
mazipan.space
Loading Performance Lighthouse CLS LCP Speed Index TTI TTFB
Runtime Performance DevTools FPS CPU Usage Main Thread GC
Pixel Pipeline
Visual Change Trigger (JS/CSS) Common pixel pipeline Style Calculation Layout
Paint Composite
How to debug?
Paint Flashing On Chrome DevTools
Timeline on Safari
Recommendation
Recommendations 1. Optimize JavaScript Execution 2. Reduce the Scope and
Complexity of Style Calculations 3. Avoid Large, Complex Layouts and Layout Thrashing 4. Simplify Paint Complexity and Reduce Paint Areas 5. Stick to Compositor-Only Properties and Manage Layer Count 6. Debounce Your Input Handlers
Lesson Learned
None
Unnecessary Rendering See: https://codesandbox.io/s/aloha-css-uyox7 Problems: - Box repainting on sliding
- Hello3 & Hello4 unnecessary repaint Hints: - Stacking context - will-change
Infinite hidden animation See: https://codepen.io/mazipan/details/gOGLpev Problems: - Skeleton loading for
hidden element triggering repaint Alternatives: - Remove skeleton loading, or - Only show before the element will showing
JS First Problems: - Countdown timer w JS approach will
always trigger repaint for every second Alternatives: - Use CSS/SVG transition w JS for only generating the initial state
50% * Reduce more than CPU usage *On idle state
None
ksana.in/learn-render-perf
ksana.in/udacity-render-perf
Key Takeaways 1. Stick to the compositor-only props 2. Double
check your Stacking Layer 3. Check the hidden element 4. CSS First 5. Measure periodically
Thank You.