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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
150
Mengukur dan meningkatkan performa website
mazipan
1
240
Testing JavaScript
mazipan
0
180
Membuat Website Zaman Sekarang
mazipan
0
530
Kinerja Web 101 - Edisi 2022
mazipan
1
490
Bagaimana implementasi mockup design
mazipan
0
540
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
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
160
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
190
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
310
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
180
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
150
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
1.1k
Angular-Apps smarter machen mit Gen AI: Lokal und offlinefähig - Hands-on Workshop!
christianliebel
PRO
0
120
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
330
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
240
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
220
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
770
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
190
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.2k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
250
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
78
Abbi's Birthday
coloredviolet
2
5.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
130
Believing is Seeing
oripsolob
1
86
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Being A Developer After 40
akosma
91
590k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
770
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
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.