~/talk

Performance in Compose:Lessons learned from Lazy layouts

Talkat Droidcon London 2023 · 2023-10-26..10-27· [android, web-performance]
slides:none on file

Updating to the latest Compose yields measurable wins—benchmarks show around 25% scroll frame-time improvement since recent releases—and switching debug APKs to release gives roughly a 4x startup speedup; enabling R8 and baseline profiles removes JIT pauses. Moving frequently changing state reads out of composition into later phases using modifier.layout and drawWithContent cuts recompositions (measure is ~3x cheaper than composition; draw can be ~10x cheaper for backgrounds). DerivedState helps only when results are stable; refactoring to a single state holder and MutableStateFlow reduced allocations and gave about a 9% frame-time improvement.

AI-written summary · about

  1. 0:00Introduction to Compose performance
  2. 1:09Evolution of Compose optimization
  3. 3:00Update to latest Compose version
  4. 6:53Mastering frame phases in Compose
  5. 17:17Derived state best practices
  6. 25:12Optimizing initial composition
  7. 32:38Key takeaways and future work
~/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.