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
530
Kinerja Web 101 - Edisi 2022
mazipan
1
480
Bagaimana implementasi mockup design
mazipan
0
530
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
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
組織で育むオブザーバビリティ
ryota_hnk
0
180
ぼくの開発環境2026
yuzneri
0
230
SourceGeneratorのススメ
htkym
0
200
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
Architectural Extensions
denyspoltorak
0
290
CSC307 Lecture 08
javiergs
PRO
0
670
Fluid Templating in TYPO3 14
s2b
0
130
AtCoder Conference 2025
shindannin
0
1.1k
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.2k
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
140
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
140
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Raft: Consensus for Rubyists
vanstee
141
7.3k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
The Pragmatic Product Professional
lauravandoore
37
7.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
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.