~/talk

Boosting Compose UI from Sluggish to Snappy

Talkat droidcon San Francisco 2024 · 2024-06-06..06-07· [android, web-performance]

A Compose card stack that initially misses frame deadlines by ~50–60 ms gets rebuilt as a sandboxed “Janky Tinder” and profiled with macrobenchmark frame timing, system traces augmented by the Compose runtime tracing library, Peretto and the layout inspector. Fixes include measuring only visible cards (reducing thousands of measures to three), switching animated modifiers to lambda-backed graphicsLayer and deferring state reads to lambdas to cut recompositions, replacing LazyRow/MaterialCard with simple Row/Box, and enabling compiler strong skipping after inspecting compose compiler metrics; end-to-end latency falls into the high teens.

AI-written summary · about

  1. 0:00Compose UI performance issues
  2. 1:07Janky Tinder challenge
  3. 2:10Quantifying jank with macrobenchmarks
  4. 5:01Diagnosing with system trace
  5. 9:40Excessive card instances with layout inspector
  6. 10:42Fixing measure phases in layouts
  7. 13:09Recomposition spikes with layout inspector
  8. 14:54Compose performance book insights
  9. 18:46Lambda modifiers and state reads
  10. 20:13New features and regression risks
  11. 22:40Massive regression with Perfetto
  12. 23:41Simpler composables for LazyRow
  13. 28:18Compose compiler metrics
  14. 31:48Strong skipping for recompositions
  15. 34:12Final performance validation
  16. 34:55Recap of fixes
  17. 37:20Macrobenchmark testing best practices
  18. 38:03Baseline profiles impact
  19. 39:06Performance debugging tools
~/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.