Android performance interview questions
The main thread, ANRs, jank, memory leaks, startup, Baseline Profiles, profiling and app size.
– interview-ready · 12 questions in this topic
– of 12 tried
Saved on this device. Interview-ready means you got it right on two different days. Guesses and hints count for less.
Questions
Practise this topic
Flashcards · 17
Flip, then say if you knew it. Needs JavaScript; every answer is also on its question page.
Quick quiz · 12 questions
One exercise per question, checked as you go. Needs JavaScript.
Mock interview · 2 sets
Timed, out loud, then tick what you covered. Needs JavaScript.
Fix this PR · 1 review
Review a diff like a senior: flag the lines you'd comment on. Needs JavaScript.
Quick facts
Recall the answer first, then tap Show to check.
Frame budget
At 60 Hz each frame has 16.7 ms; at 90 Hz 11.1 ms; at 120 Hz 8.3 ms.
Input ANR timeout
An ANR is reported when an input event gets no response within 5 seconds.
reportFullyDrawn()
Calling reportFullyDrawn() tells the system when your content is ready, giving time to full display.
profileable
<profileable android:shell="true"/> lets profilers attach to a release build.
LeakCanary
LeakCanary watches destroyed Activities, Fragments and ViewModels and reports any that aren't garbage-collected.
Printable cheat sheet · Review your weak spots in this topic
Share your progress
Sources: Question outline adapted from Android-Interview-Questions by Mohsen Mirhoseini, licensed under Apache 2.0. We reorganised the questions, rewrote every answer and added new ones. Credits and license