~/talk

How do LiveData and Coroutines actually work

Talkat GDG DevFest Belarus 2018 · on Sunday, 2018-12-16· [android, concurrency]
slides:none on file

Explains that LiveData is just a data holder and the config-change “magic” comes from Activity keeping a ViewModelStore via retainNonConfigurationInstance so ViewModelStore is just a HashMap holding ViewModel instances across recreation, not LiveData surviving by itself. Demos coroutines: suspend functions compile to continuations and a label-driven state machine — suspend functions become a switch-based state machine — and benchmarks 100 coroutines vs a 4-thread executor fetching example.com (coroutines ~2s faster) — 100 coroutines vs 4-thread pool fetch example.

AI-written summary · about

  1. 0:00Intro
  2. 1:28Agenda
  3. 4:34LiveData
  4. 10:28Fragment
  5. 14:11Model Provider
  6. 15:26Surviving Configuration Change
  7. 18:00Surviving Configuration Change API
  8. 20:19Coroutines
  9. 21:54Documentation
  10. 23:28Example
  11. 28:19How Coroutines work
  12. 37:29Coroutines in Java
  13. 43:39Questions
~/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.