Browse Questions

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:

  1. Profile with Instruments Time Profiler
  2. Look for cellForRowAt taking too long
  3. Move image decoding / layout off the main thread
  4. Use os_signpost to confirm the improvement