~/talk

Mastering Recomposition: Optimizing State Changes for Efficient UI

Talkat AndroidMakers by droidcon 2026 · on Thursday, 2026-04-09· at 10:00· [android]
slides:none on file

Jetpack Compose recomposition is driven by snapshot state reads, so changing a snapshot state property triggers recompose and getters set up listeners; recomposition is usually cheap and heavy work appears when components do costly calculations. A demo using the layout inspector shows screens “blinking” on recompose; a measured optimization of the value provider pattern reduces some leaves but costs a lot and often isn’t worth it. Use narrower read scopes, pass specific props, supply keys, stability analyzer helps spot issues, remember expensive or mutable values, and optimize only after profiling.

AI-written summary · about

  1. 0:00Re-composition in Compose
  2. 1:28UI tree from composition
  3. 3:17Snapshot state drives re-composition
  4. 6:54Re-composition propagation
  5. 7:14Value provider pattern pitfalls
  6. 9:11Measure re-composition with Layout Inspector
  7. 12:43When recomposition becomes a real performance issue
  8. 15:38Efficient recomposition best practices
  9. 17:43Narrower state reading scope
  10. 19:05Pass only needed properties
  11. 20:08Avoid recursive triggers
  12. 21:12Use keys to preserve identity
  13. 23:38Remember expensive values
  14. 24:40Lift state to ViewModel
  15. 26:26Q&A on composition
  16. 28:14Stability and skipping mode
  17. 32:27State pattern vs property pattern
  18. 37:23Canvas calculations handling
  19. 40:14Complex UI state with sealed classes
  20. 44:30Closing remarks
~/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.