~/talk

Let’s Sprinkle some #PerfMatters on your ViewGroups

Talkat Droidcon Italy 2016 · 2016-04-07..04-08· [web-performance, android]
slides:none on file

Claim: replacing nested RelativeLayouts with a custom ViewGroup that flattens the hierarchy and implements precise onMeasure/onLayout logic cuts expensive double-measure passes and dramatically reduces jank. Evidence: use systrace and Hierarchy Viewer to find long traversal/draw times, then confirm frame-quality with gfxinfo; on tested devices janky frames drop from ~7–8% toward the 1–2% smooth-scrolling target. Built artifact: an AlbumView that measures with measureChildWithMargins setMeasuredDimension and layouts children directly, and it works.

AI-written summary · about

  1. 0:00Start
  2. 2:11From the Material spec
  3. 5:49The 16 ms target
  4. 6:54Let's investigate!
  5. 7:48Let's zoom in
  6. 10:10Next step: measure layouting performances
  7. 12:57Relative Layout
  8. 14:55What about the other ViewGroups ?
  9. 17:00A simple example
  10. 25:36The result
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.