~/talk

Layout traversals on Android

Talkat droidcon Berlin 2015 · 2015-06-15..06-17· [frontend-architecture]
links:none on file
slides:none on file

Android batches UI work on a per-frame tick (≈60fps, ~16ms) via Choreographer (Jellybean); input runs first, then animations, then traversal. requestLayout bubbles up to the root (ViewRootImpl) and only schedules one traversal per frame but each call walks parents, so deep hierarchies cost time. draw builds display lists → GPU; use hardware layers to avoid recreating them every frame. Avoid allocations in onDraw, avoid layout changes during animations, and invalidate regions not whole views.

AI-written summary · about

  1. 0:00Start
  2. 8:59PRE-JELLY BEAN
  3. 12:53CHOREOGRAPHER
  4. 15:51LAZY MEASURE
  5. 16:39FRAME IT
  6. 17:13DISPLAY LISTS
  7. 20:40requestLayout()
  8. 22:05invalidate(...)
~/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.