


A
Mobile UI performance issues are common in consumer apps such as Instagram, especially on animation-heavy screens. Interviewers ask this to evaluate whether you can debug performance systematically instead of guessing.
A mobile screen feels janky during scroll or animation. Walk through how you would diagnose and fix it.
Address these points:
The interviewer expects a structured debugging process, not platform-specific trivia. You should explain the rendering pipeline at a practical level, describe the signals you would inspect in profiling tools, and connect likely symptoms to targeted fixes.
Rendering jank happens when the app misses its frame deadline. At 60 FPS, each frame has about 16.67 ms; at 120 FPS, the budget is about 8.33 ms. If work on the UI thread, render thread, or GPU exceeds that budget, frames are delayed or dropped.
A frame usually involves input handling, state updates, layout, painting, compositing, and GPU submission. Breaking the pipeline into stages helps isolate whether the slowdown comes from CPU work, excessive layout invalidation, overdraw, texture uploads, or shader cost.
Performance work should start with traces and counters, not assumptions. Tools such as frame timelines, thread traces, GPU overdraw views, and memory/GC timelines reveal whether the issue is deterministic, intermittent, or caused by specific interactions like image loading or list recycling.
# Pseudocode for measuring frame durations
frame_times = [12, 18, 14, 25, 16]
janky = [t for t in frame_times if t > 16.67]
print(len(janky))
Different bottlenecks require different fixes. Main-thread spikes suggest reducing layout passes or synchronous work; GPU bottlenecks suggest reducing overdraw, blur, shadows, or large textures; GC spikes suggest lowering allocations during scroll or animation.
A fix is only complete if you can show improved metrics under the same test conditions. Teams often compare p95 frame time, dropped-frame rate, and memory churn before and after, then add automated performance checks to prevent regressions.