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
170
Membuat Website Zaman Sekarang
mazipan
0
530
Kinerja Web 101 - Edisi 2022
mazipan
1
490
Bagaimana implementasi mockup design
mazipan
0
530
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
JPUG勉強会 OSSデータベースの内部構造を理解しよう
oga5
2
220
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
1
330
2026年は Rust 置き換えが流行る! / 20260220-niigata-5min-tech
girigiribauer
0
210
株式会社 Sun terras カンパニーデック
sunterras
0
1.9k
AIに仕事を丸投げしたら、本当に楽になれるのか
dip_tech
PRO
0
170
Premier Disciplin for Micro Frontends Multi Version/ Framework Scenarios @OOP 2026, Munic
manfredsteyer
PRO
0
190
Python’s True Superpower
hynek
0
190
Beyond the Basics: Signal Forms
manfredsteyer
PRO
0
100
Event Storming
hschwentner
3
1.3k
今、アーキテクトとして 品質保証にどう関わるか
nealle
0
190
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
8
2.7k
AIプロダクト時代のQAエンジニアに求められること
imtnd
1
500
Featured
See All Featured
A Soul's Torment
seathinner
5
2.4k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Six Lessons from altMBA
skipperchong
29
4.2k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
130
Bash Introduction
62gerente
615
210k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
170
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
380
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Between Models and Reality
mayunak
1
210
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
180
So, you think you're a good person
axbom
PRO
2
1.9k
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.