Flat as a pancake
summary
Three implementations of a RecyclerView‑style item measure actual costs: a flat RelativeLayout baseline, swapping ImageViews for Drawables to remove per-view display lists, and finally drawing text with TextLayout wrapped as a drawable. Measurements use Android C traces and show a 13% win from drawables and a 26% win when moving text into TextLayout, plus a further 10x first‑draw speedup when prepopulating glyph caches. The talk also shows regressions: ripple invalidation forces whole‑view redraws and breaks accessibility and touch conveniences.
AI-written summary · about
chapters (7)
- 0:00Start
- 1:35Drawing process
- 6:01Performance analysis
- 8:56Drawables
- 14:20Drawing text
- 28:20Accessibility
- 30:29Touch events
related talks
41mLoving Lean Layouts
42mMeasure. Layout. Draw. Repeat: Custom Views and ViewGroups
51mMeasure, Layout, Draw, Repeat: Custom Views and ViewGroups
48mEfficient Android Layouts
35mLoving Lean Layout
37mAndroid Text, The Good The Bad and The ugly
35mMake It Fit, how Android measures and draws views
32mA Skeptics Guide to Programmatic Views on Android
