~/talk

Jetpack Compose: Drawing without pain and recomposition

Talkat droidcon Berlin 2024 · 2024-07-03..07-05· [android, frontend-architecture]
links:none on file
slides:none on file

Shows concrete fixes that cut recomposition and allocations: replace state-read modifiers (alpha, offset, background) with versions that read state in layout or draw so composition skips during animations; use graphicsLayer for animating layer properties and drawWithCache + canvas.translate to cache brushes and avoid thousands of gradient / object allocations (example: 1,363 gradient creations before fix). Demonstrates Lottie moving progress to a lambda to stop per-frame recompositions and a native-canvas fallback to eliminate 79,000 boxed Offset allocations in a particle system.

AI-written summary · about

  1. 0:00Jetpack Compose drawing intro
  2. 2:56Compose phases explained
  3. 5:27Recomposition triggers & optimizations
  4. 10:29Defer state reads
  5. 13:09Optimize height & animations
  6. 16:39Background color animation
  7. 19:28Phase-based optimizations
  8. 21:40Library recomposition handling
  9. 24:12When to optimize recomposition
  10. 24:58Memory optimization in drawing
  11. 29:02Particle system challenges
  12. 34:24Native canvas access
  13. 35:09Summary & Q&A
~/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.