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
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
200
DMMオンラインサロンアプリのSwift化
hayatan
0
190
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
3
190
ある日突然あなたが管理しているサーバーにDDoSが来たらどうなるでしょう?知ってるようで何も知らなかったDDoS攻撃と対策 #phpcon.2024
akase244
2
7.7k
令和7年版 あなたが使ってよいフロントエンド機能とは
mugi_uno
10
5.2k
いりゃあせ、PHPカンファレンス名古屋2025 / Welcome to PHP Conference Nagoya 2025
ttskch
1
180
AWSのLambdaで PHPを動かす選択肢
rinchoku
2
390
Beyond ORM
77web
11
1.6k
歴史と現在から考えるスケーラブルなソフトウェア開発のプラクティス
i10416
0
300
各クラウドサービスにおける.NETの対応と見解
ymd65536
0
250
rails newと同時に型を書く
aki19035vc
5
710
20241217 競争力強化とビジネス価値創出への挑戦:モノタロウのシステムモダナイズ、開発組織の進化と今後の展望
monotaro
PRO
0
280
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
240
Agile that works and the tools we love
rasmusluckow
328
21k
BBQ
matthewcrist
85
9.4k
Scaling GitHub
holman
459
140k
Raft: Consensus for Rubyists
vanstee
137
6.7k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Being A Developer After 40
akosma
89
590k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
500
Optimizing for Happiness
mojombo
376
70k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
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.