~/talk

Why WhatsApp Uses ListView

Talkat droidcon London 2024 · 2024-10-31..11-01· [android, frontend-architecture]
slides:none on file

WhatsApp keeps a legacy ListView with CursorAdapter on the chat screen because it supports dozens of message layouts, reads pages from the DB on demand, and can’t reliably reuse views when types change, so recycling is partial and code already caches objects. Updates often use notifyDataSetChanged to avoid animation delays, and a full migration to RecyclerView would require changing data flow, rebuilding features, running risky A/B tests for a billion daily users, and only gains diffutil updates and marginal layout features.

AI-written summary · about

  1. 0:00Introduction
  2. 1:31WhatsApp chat screen
  3. 3:00ListView vs RecyclerView
  4. 6:54WhatsApp’s CursorAdapter
  5. 9:09Message types and recycling
  6. 10:13Handling list updates
  7. 11:36RecyclerView benefits
  8. 14:50Risks of RecyclerView
  9. 17:20Cost analysis
  10. 20:35Decision to keep ListView
  11. 21:41RecyclerView elsewhere
  12. 22:45Q&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.