Writing performant layouts
summary
Explains how Android rendering hits a 60fps budget of 16ms per frame and shows a case where traversal takes ~19ms, causing jank, then uses Layout Inspector, Lint, Systrace and Android Profiler to find costly nested parents. Replaces included headers with the merge tag, swaps heavy includes for ViewStub where appropriate, measures with the FrameMetrics API, and reports about a ~40% render cost reduction by flattening layouts and preferring ConstraintLayout over Relative/Grid/weighted Linear layouts.
AI-written summary · about
chapters (9)
- 0:00Introduction to performant layouts
- 2:15Diagnosing layout issues
- 5:10Optimizing nested layouts
- 8:47Replacing include tags with merge
- 11:36Constraint vs relative layouts
- 14:25Lazy loading views with ViewStub
- 17:40Recap and best practices
- 19:50Drawbacks of over-optimization
- 20:36Q&A session
related talks
48mEfficient Android Layouts
48mLet's sprinkle some #PerfMatters on our ViewGroups (fr)
35mThe Impact of Micro-Optimizations on Large-Scale Apps
35mLoving Lean Layout
40m“Performance by Design”
36mPerformance Optimization in Android Applications
01h 23mWhy Slow?
29m10 Ways To Improve Your Android App Performance
