~/talk

Unblocking The Main Thread: Solving ANRs and Frozen Frames

Talkat droidcon Berlin 2024 · 2024-07-03..07-05· [web-performance]
slides:none on file

Apps freeze at 700 ms and ANRs trigger at 5 s; profiling shows vector drawable init costing ~78 ms each, encrypted SharedPreferences can take up to ~500 ms and retrofit/HTTP setup ~100 ms. Sharing coroutine/dispatcher thread pools cuts idle threads by about 50 threads, moving heavy init off the main looper and loading big images asynchronously with Coil or Glide prevents frozen frames. Baseline profiles yield roughly 20–30% faster startup, Android 14 narrows ST trace delay to 30–50 ms for more accurate ANR captures.

AI-written summary · about

  1. 0:00Introduction
  2. 7:48Main thread bottlenecks
  3. 13:04Memory pressure and GC
  4. 22:13First frame rendering
  5. 27:18Vector drawables and images
  6. 30:51Debugging ANRs
  7. 34:04Profiling tools
  8. 36:32Post-optimization profiling
  9. 37:36Performance retro
~/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.