Android Performance

This topic turns performance optimization from intuition into a verifiable workflow: define the metric, use traces to locate the bottleneck, then confirm the gain through benchmarks and production monitoring.

Learning Path

  1. Cold start: from Zygote fork to first frame.
  2. Rendering: View, RenderThread, HWUI, and SurfaceFlinger.
  3. Memory: Bitmap, leaks, native heap, and OOM.
  4. Tools: Perfetto, Systrace, and Macrobenchmark.
  5. Special topics: audio, lists, stability, and production governance.

Core Articles

Runtime, Memory, and Graphics Performance

Performance Debugging Framework

  • Define the metric first: P50, P90, P99, first frame, dropped frames, memory peak.
  • Collect evidence: Perfetto trace, logs, ANR trace, heap dump, benchmark results.
  • Break down the path: main thread, Binder, I/O, rendering, GC, scheduling.
  • Verify the fix: local benchmarks, staged monitoring, and regression gates.

Next Step

If the performance issue is tied to UI state updates, continue with Jetpack Compose Deep Dives. If the bottleneck involves model inference, NPU scheduling, power, or thermal behavior, go to Android On-device AI. If the issue comes from builds, tests, or release pipelines, go to Mobile Engineering.