Android Developer interview question

How do you improve Android app performance?

Improve Android performance by measuring startup, frame timing, memory, battery and network with Macrobenchmark, profiler and traces; fix main-thread blocking, excessive recomposition, allocations, or oversized work.

Direct answer

What a strong answer covers

How it works

Performance work is driven by measurements of what users feel: cold start time, jank measured as frames over the deadline, memory pressure, battery, and network volume. Macrobenchmark gives reproducible startup and scroll numbers, the profiler and Perfetto traces show what the main thread is doing during a slow frame, and the Compose layout inspector counts recompositions. Typical wins are moving disk and network work off the main thread, deferring initialisation from Application.onCreate with App Startup, fixing over-recomposition, using baseline profiles so hot code is precompiled, and shrinking images to the size actually displayed.

Example

A list that dropped frames on scroll showed in a Perfetto trace that each row decoded a full-size bitmap on the main thread; loading through Coil with a size hint and an async decoder brought frame time under 16 ms. Adding a baseline profile cut cold start from 1.8 s to 1.1 s on a mid-range device, verified by Macrobenchmark before and after.

Common mistakes

  • Optimising by intuition instead of a trace of the slow frame or the slow start.
  • Measuring on a flagship phone and ignoring the low-end devices most users have.
  • Initialising every SDK synchronously in Application.onCreate.

A useful answer structure

Answer from your own work.

Do not memorise a script: use only examples you can explain honestly in follow-up questions.

Practise this answer with MiraHint

Open the desktop workspace and rehearse a clear answer in your own words.

Download MiraHint
Android Developer interview questions