~/talk

Boosting Compose UI from Sluggish to Snappy

Talkat AndroidMakers by droidcon 2024 · on Friday, 2024-04-26· at 10:30· [android]

A janky Tinder clone is diagnosed and optimized: engineers use Macrobenchmark frame timing to quantify jank, capture traces with Layout Inspector and Systrace/Perfetto plus the composition tracing Library, and fix hotspots by moving expensive measure/place work out of invisible cards, switching to lambda graphicsLayer modifiers, deferring state reads, and using derivedStateOf and immutable collections for stability. Result: p50 frame time drops about 40% and p90 improves roughly 30% on a Pixel 3A, with far fewer recompositions.

AI-written summary · about

  1. 0:00Compose UI performance challenges
  2. 1:07Janky Tinder app demo
  3. 2:10Frame performance with benchmarks
  4. 6:18Debugging with tracing
  5. 11:32Fixing measure phases in card stack
  6. 14:43Recomposition and its impact
  7. 18:34Lambda modifiers to reduce recomposition
  8. 21:02Defer state reads for optimization
  9. 25:55Limit recompositions with derivedStateOf
  10. 31:58Stability with Compose compiler metrics
  11. 36:12Immutable lists to prevent recomposition
  12. 39:04Final fixes and verification
  13. 40:30Performance gains with benchmarks
  14. 42:15Summary of debugging and optimization
~/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.