~/talk

Unblocking The Main Thread: Solving ANRs and Frozen Frames

Talkat AndroidMakers by droidcon 2024 · on Thursday, 2024-04-25· at 17:15· [observability]
slides:none on file

Shows concrete fixes and measurements: uses Firebase Performance, R8, LeakCanary and a custom jenat trace to find slow spots, shares results like reduced thread count from 180 to 130 by sharing thread pools, and finds okhttp/encrypted‑prefs initialization that took 300ms costing 900ms across features, then moves that work off the main thread or lazy‑inits it. Presents baseline profiles and A/B tests, reports time‑to‑interactive falling from ~12s with measurable gains after each change.

AI-written summary · about

  1. 0:00Main thread performance issues
  2. 3:15Slow rendering and frozen frames
  3. 6:04ANRs impact on UX
  4. 8:12Measuring performance in production
  5. 10:35No single optimization solution
  6. 11:20Offload work with coroutines
  7. 13:26Thread pools to reduce memory
  8. 15:11Startup time with R8 and ProGuard
  9. 17:20Detecting memory leaks
  10. 20:26Preventing DI memory leaks
  11. 21:49Lazy initialization for startup
  12. 24:16Optimize resources with WebP and Vector Drawables
  13. 25:40Compose optimizations and recomposition
  14. 29:12Baseline profiles for faster startup
  15. 31:36Validating optimizations in production
  16. 32:39Profiling hidden bottlenecks
  17. 34:03Android performance retrospective
  18. 38:39Closing remarks
~/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.