Tuning your app using Xcode's Instruments
summary
Xcode Instruments workflow that finds a 70‑node retain cycle (fixed with a single weak self change), uses the new Xcode 26 processor trace collects all CPU events (works on macOS but not the iPhone 17 Pro in this setup), and combines SwiftUI, Time Profiler and Hangs to pinpoint a millisecond‑range stall: a UIImage is recreated on every body render (causing UI hitches and slow saves because SwiftData runs on the main thread). Fixes: cache UIImage in state, replace conditional TextField creation with a ZStack/opacity, and use OSLog signposts to correlate traces.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 0:13About the speaker
- 1:50Building apps with hobbies
- 4:43Engineering performance
- 6:39Getting started with Instruments
- 8:29New features in Xcode 26
- 11:35Threading and concurrency
- 14:01Diagnosing app hangs
- 17:44Live debugging session
- 30:21Iterative performance fixing
- 32:41Advanced debugging techniques
- 35:55Final optimizations and conclusion
related talks
30mFrom Slow to Flow: Tips for Accelerating Your App Performance
24mSwiftUI Performance Tips
47mSwiftUI Performance for Demanding Apps
41mInstruments: Profiling Your App in Practice
30miOS Observability & Performance Metrics
23mReducing App Launch Times: From Diagnostics to Optimization
37mTake your iOS debugging skills to the next level
24mWrangling the CPU iOS Performance in the Facebook App
