In Search of Performance: the Subtle Art of Android Profiling
summary
A practical, step-by-step Android profiling workflow that starts by reproducing a real user scenario and capturing signals with scrcpy screenrecord, then collects Perfetto traces (for flame graphs) and Android Studio CPU/memory callstacks. It shows concrete issues found—e.g., a 200 MB string in SharedPreferences blocking startup, repeated database reads slowing list rendering, and GC spikes causing jank—and describes creating a release-profile build variant, adding trace markers, and running scripts to collect traces so root causes can be pinpointed and fixed.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 3:49Android profiling pillars
- 5:14Basic profiling rules
- 8:04Onion rule and method
- 10:11ScreenCopy for UX capture
- 11:35Perfetto system profiling
- 16:50Perfetto trace analysis
- 21:39Observations and hypotheses
- 22:22Android Studio local profiling
- 24:12Android Studio techniques
- 27:02Flame Graphs interpretation
- 28:29Perfetto vs Android Studio
- 29:52Jank with Perfetto
- 30:13Garbage collection issues
- 31:14Memory leak tools
- 32:38Custom traces in code
- 33:20Code and system trace correlation
- 34:44Key steps summary
related talks
39mDeep-Diving Android Performance with Perfetto
43mPerformance in a Kotlin World
41mDeep dive into Android Studio Profilers
40mDebugging Android Performance at Scale: Lessons from Building Datadog's Mobile Profiler
45mFinding and Fixing Performance Problems
38mA Busy Android App Developers' Guide to Perfetto
31mImprove app performance with Android Studio Profilers
24mPerformance Tooling
