$30 off During Our Annual Pro Sale. View Details »
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
420
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
230
Testing JavaScript
mazipan
0
160
Membuat Website Zaman Sekarang
mazipan
0
510
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
540
Bongkar Dapur Webnya #PHPID-OL
mazipan
0
530
Other Decks in Programming
See All in Programming
AIコーディングエージェント(NotebookLM)
kondai24
0
220
FluorTracer / RayTracingCamp11
kugimasa
0
250
gunshi
kazupon
1
110
AIコーディングエージェント(skywork)
kondai24
0
200
Python札幌 LT資料
t3tra
6
1k
チームをチームにするEM
hitode909
0
370
tparseでgo testの出力を見やすくする
utgwkk
2
260
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
280
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
1
480
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
140
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
150
俺流レスポンシブコーディング 2025
tak_dcxi
14
9.4k
Featured
See All Featured
Exploring anti-patterns in Rails
aemeredith
2
200
Designing for Performance
lara
610
69k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
48
GraphQLとの向き合い方2022年版
quramy
50
14k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Design in an AI World
tapps
0
97
Digital Ethics as a Driver of Design Innovation
axbom
PRO
0
130
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
1
860
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
29
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.