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
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
140
Mengukur dan meningkatkan performa website
mazipan
1
240
Testing JavaScript
mazipan
0
170
Membuat Website Zaman Sekarang
mazipan
0
520
Kinerja Web 101 - Edisi 2022
mazipan
1
470
Bagaimana implementasi mockup design
mazipan
0
520
Memulai karir sebagai web programmer
mazipan
0
750
Membuat laporan kecepatan web untuk blog
mazipan
0
550
Bongkar Dapur Webnya #PHPID-OL
mazipan
0
530
Other Decks in Programming
See All in Programming
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
0
580
dchart: charts from deck markup
ajstarks
3
960
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
230
Cap'n Webについて
yusukebe
0
170
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
640
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
150
余白を設計しフロントエンド開発を 加速させる
tsukuha
4
260
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
470
CSC307 Lecture 01
javiergs
PRO
0
670
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
340
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
110
SQL Server 2025 LT
odashinsuke
0
160
Featured
See All Featured
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
99
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
120
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.3k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
36
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
290
A designer walks into a library…
pauljervisheath
210
24k
Claude Code のすすめ
schroneko
67
210k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
42
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
48
Unsuck your backbone
ammeep
671
58k
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.