Android Performance and Stability

Start with slow startup, dropped frames or a WebView renderer exit. Define the symptom before collecting evidence; each route below leads to concrete tool steps and a way to verify the result.

Choose a debugging route

SymptomRead firstNext action
Slow startup with unclear first-frame and usable-screen metricsTTID, TTFD and startup benchmarksFix the startup conditions, then inspect the critical path in Perfetto
Jank without a usable trace or a clear explanationGetting started with PerfettoReproduce the issue and inspect the main thread, scheduling and frame timing
A blank WebView or a renderer-exit callbackWebView renderer crashes and recoverySeparate exit signals from causes and verify destruction and recreation
A Compose list scrolls poorlyLazyColumn performance debuggingUse a release build and examine item identity, state reads and frame duration

From a metric to a regression check

  1. Define startup metrics: separate cold, warm and hot starts, and distinguish first frame from usability.
  2. Capture and read a Perfetto trace: map a user action to thread work and waiting time.
  3. Change one evidence-supported bottleneck while preserving the device, dataset, build type and capture conditions.
  4. Repeat measurements with Macrobenchmark. Compare distributions and check for regressions.
  5. For a renderer exit, follow the WebView stability workflow. A performance trace alone does not establish a crash cause.

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.