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
360
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
60
Mengukur dan meningkatkan performa website
mazipan
1
180
Testing JavaScript
mazipan
0
120
Membuat Website Zaman Sekarang
mazipan
0
450
Kinerja Web 101 - Edisi 2022
mazipan
1
410
Bagaimana implementasi mockup design
mazipan
0
430
Memulai karir sebagai web programmer
mazipan
0
690
Membuat laporan kecepatan web untuk blog
mazipan
0
490
Bongkar Dapur Webnya #PHPID-OL
mazipan
0
470
Other Decks in Programming
See All in Programming
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
240
Fibonacci Function Gallery - Part 2
philipschwarz
PRO
0
210
サーバーゆる勉強会 DBMS の仕組み編
kj455
1
300
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
390
歴史と現在から考えるスケーラブルなソフトウェア開発のプラクティス
i10416
0
300
Package Traits
ikesyo
1
210
快速入門可觀測性
blueswen
0
500
asdf-ecspresso作って 友達が増えた話 / Fujiwara Tech Conference 2025
koluku
0
1.4k
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
為你自己學 Python
eddie
0
520
Androidアプリのモジュール分割における:x:commonを考える
okuzawats
1
280
Flatt Security XSS Challenge 解答・解説
flatt_security
0
730
Featured
See All Featured
Become a Pro
speakerdeck
PRO
26
5.1k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
For a Future-Friendly Web
brad_frost
176
9.5k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.2k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Why Our Code Smells
bkeepers
PRO
335
57k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Designing for Performance
lara
604
68k
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.