Interview PrepMidOpen-ended
What tools do you use to debug performance issues in iOS?
Explanation & Code
Answer:
- Instruments — CPU Profiler, Time Profiler, Allocations, Leaks, Core Data
- Xcode Memory Graph — find retain cycles and leaked objects
- View Hierarchy Debugger — spot off-screen renders, overlapping views
- MetricKit — on-device production diagnostics
- os_signpost — custom time intervals in Instruments
Workflow for a slow scroll:
- Profile with Instruments Time Profiler
- Look for
cellForRowAttaking too long - Move image decoding / layout off the main thread
- Use
os_signpostto confirm the improvement
Rate your understanding: