Users say a list in your app stutters while scrolling. How would you find and fix the problem?
What the interviewer wants to hear
- Reproduce on a low-end device in release mode
- Profile with Android Studio Profiler, Xcode Instruments or Flutter DevTools
- Look for main-thread work: image decoding, parsing, database calls
- Use lazy lists with stable keys and avoid unnecessary recomposition or re-render
- Downsample and cache images, flatten layouts
Model answer
First I reproduce it on a real low-end device using a release build, because debug builds are slower and misleading. Then I profile: Android Studio Profiler and system traces, Xcode Instruments Time Profiler, or Flutter DevTools frame chart. I look for frames that miss the 16ms budget (or 8ms at 120Hz) and what runs on the main thread during them. Common causes are decoding large images, JSON parsing or database queries on the main thread, deep or complex item layouts, and items re-rendering when nothing changed. Fixes include moving work to background threads, using an image library that downsamples and caches, giving list items stable keys, making item parameters stable or memoised, and simplifying layouts. Then I measure again to confirm.
Can you answer it under time pressure?
Take a timed medium round and get scored on every answer.
More medium Mobile App Developer questions
- How would you add offline support to an app that currently only works online?
- Walk me through how you release a new version of a mobile app to the stores.
- What is dependency injection and how have you used it in a mobile app?
- What security practices do you follow when building a mobile app?
- How do you manage state in a Flutter or React Native app as it grows beyond a few screens?
- What testing strategy do you use for a mobile app, and what do you test at each level?
- How would you implement deep links in a mobile app from end to end?
- How do you make a mobile app accessible, and how do you check it?
- How would you set up CI/CD for a mobile app?