$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
130
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
510
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
Why Kotlin? 電子カルテを Kotlin で開発する理由 / Why Kotlin? at Henry
agatan
2
6.9k
dnx で実行できるコマンド、作ってみました
tomohisa
0
140
JETLS.jl ─ A New Language Server for Julia
abap34
1
320
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
6
3k
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
380
生成AIを利用するだけでなく、投資できる組織へ
pospome
0
240
CSC305 Lecture 17
javiergs
PRO
0
340
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
230
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
1
1.4k
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
390
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
8
5.5k
WebRTC と Rust と8K 60fps
tnoho
2
1.9k
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
Making Projects Easy
brettharned
120
6.5k
A better future with KSS
kneath
240
18k
RailsConf 2023
tenderlove
30
1.3k
Building an army of robots
kneath
306
46k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Building Applications with DynamoDB
mza
96
6.8k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
93
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Balancing Empowerment & Direction
lara
5
790
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
The Invisible Side of Design
smashingmag
302
51k
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.