Which Instrument diagnoses scroll stuttering and dropped frames?

Tests whether you connect UI jank to Instruments data. A strong answer names the Core Animation or Time Profiler instrument, cites frame duration and hitch ratio, and correlates spikes with main-thread work.
What's really being asked
This question evaluates whether you can move beyond vague complaints about lag and use Instruments to isolate frame drops to a specific subsystem. The interviewer wants to see that you understand the difference between a symptom, stuttering, and diagnosable signals like hitch ratio, frame duration, and main-thread blocking. Senior engineers are expected to correlate visual jank with quantitative data and know which instrument collects that data without fishing.
The full answer
First, name the Core Animation instrument or the Time Profiler as the starting point. Second, list concrete data points to inspect: frame duration values that exceed 16.67 milliseconds on a 60 Hertz display, the hitch ratio graph showing how many frames missed their deadline, the FPS counter trend during the scroll, and yellow or red overlays indicating off-screen rendering or blending. Third, explain that you would cross-reference spikes in the Time Profiler with the frame boundaries in the Core Animation track to see if the main thread is blocked by layout, decoding, or synchronous I/O. Fourth, mention checking for memory pressure or heavy autorelease activity if the stutter is intermittent rather than consistent.
The mistakes people make
Suggesting you add print statements around scrollViewDidScroll to measure time is a red flag because logging itself alters performance and lacks frame-boundary precision. Blaming the system or claiming you would just reduce image sizes without profiling first shows you skip measurement. Another weak pattern is mentioning the Leaks instrument as the primary tool, since memory leaks rarely cause rhythmic frame drops during scrolling. Finally, saying you would look at overall CPU percentage without correlating it to specific frames misses the point entirely.
What usually comes next
The interviewer may ask how you would fix a hitch caused by synchronous image decoding on the main thread, or how you would verify that a fix actually reduced the hitch ratio in a before-and-after Instruments session. They might also probe whether you know the difference between a hitch and a stall, or how 120 Hertz ProMotion displays change your target frame budget to 8.33 milliseconds.
A concrete example
Suppose a table view stutters when new rows appear. You record a trace with the Core Animation instrument and see hitch spikes exactly when cells come onscreen. You switch to the Time Profiler, filter for the main thread, and observe that a custom UIImage extension is calling decodedImage on the main queue. Moving that decoding to a background context and using prepareForDisplay reduces the frame duration from 28 milliseconds back under 16.67 milliseconds, which the next Instruments trace confirms by showing a flat hitch graph during fast scrolling.
Interview question
You are investigating rhythmic frame drops during table view scrolling. Which profiling strategy best isolates the specific subsystem causing the hitches?
- a.Insert print statements in scrollViewDidScroll to measure callback duration and detect slow scroll events
- b.Profile with the Leaks instrument to determine if memory leaks are causing rhythmic drops during scrolling
- c.Record with the Core Animation instrument to find hitch spikes, then cross-reference Time Profiler on the main thread during those frame boundariesCorrect
- d.Monitor overall CPU percentage during scrolling to correlate high usage with visible stutter
Why? this is the answer
Core Animation reveals frame-level hitch ratios and exact frame boundaries, while Time Profiler pinpoints main-thread blocking work during those frames; print statements lack frame precision and alter performance, while Leaks and raw CPU metrics do not correlate specific frames to code paths.
Just read this? Test yourself on what you have been reading.
Read the original → developer.apple.com
- #ios
- #instruments
- #performance
- #core-animation
- #interview
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on ios — each one lists the topics its interview covers.
See open roles