~/talk

Efficient Lazy Loading for RecyclerView with Room

Talkat droidcon San Francisco 2017 · 2017-11-05..11-06· [databases, android]
links:none on file

Shows why SQLiteCursor’s built-in paging (a 2MB cursor window that even does a one-third overlap on reloads) causes wasted work and inconsistent views, and replaces it with the new Paging component that issues separate queries, converts rows to POJOs off the UI thread, closes cursors, and integrates with Room via a DataSourceFactory and LiveData. Uses PagedList/PagedListAdapter, DiffUtil on a background thread, prefetching, placeholders and boundary callbacks to support DB-only, network, or combined sources.

AI-written summary · about

  1. 0:00Introduction to lazy loading
  2. 1:23Problems with Cursor Adapter
  3. 5:17Why Room needs paging
  4. 8:12SQLite Cursor limitations
  5. 15:56Avoiding SQLite Cursor issues
  6. 16:17Goals for Paging component
  7. 21:36Performance and memory goals
  8. 22:17Paging architecture overview
  9. 25:47Paging Library components
  10. 28:15LiveData integration
  11. 30:44Database updates handling
  12. 31:05Presentation options
  13. 32:57Code example walkthrough
  14. 37:50Automatic UI updates
  15. 38:12Network and database paging
  16. 41:02Summary and 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.