~/talk

Deriving derived state: derivedStateOf explained

slides:none on file

derivedStateOf is a custom Compose state that reduces invalidations and caches per-snapshot results so expensive or lazily-used calculations (example: sorting a large list for LazyColumn layout and draw) run far less often. implementation stores dependency record IDs, snapshot IDs and write counts, hashes record IDs to detect changes, and handles nested derived states. avoid using it for cheap calculations or when outputs change as often as inputs, and ensure the lambda only reads snapshot-backed state and use rememberUpdatedState when capturing external values.

AI-written summary · about

  1. 0:00Introduction to derivedStateOf
  2. 1:08When to use derivedStateOf
  3. 3:57Lazy calculations with derivedStateOf
  4. 6:49Anti-patterns with derivedStateOf
  5. 8:53Invalidation in derivedStateOf
  6. 16:20Invalidation tracking phases
  7. 21:06Caching in derivedStateOf
  8. 23:15Snapshot-based caching
  9. 35:17Complexity of derivedStateOf
  10. 37:25Summary and best practices
~/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.