← ClaudeAtlas

ios-performance-engineeringlisted

Measure and fix iOS/macOS performance with Instruments (Time Profiler, Allocations, Hangs, App Launch), `xctrace` in CI, `OSSignposter`, MetricKit field telemetry (`MXMetricManager`, `MXHangDiagnostic`), `XCTMetric` baselines, launch time, memory footprint, and binary size. Use when diagnosing hangs, hitches, high memory, slow launch, or a large binary, wiring MetricKit, or setting CI perf baselines. SwiftUI body re-render analysis from code review → apple-skills:guide-swiftui-performance-audit or swiftui-expert's `.trace` toolchain; this skill owns measurement and the system-level surface.
wei18/apple-dev-skills · ★ 19 · AI & Automation · score 78
Install: claude install-skill wei18/apple-dev-skills
# iOS Performance Engineering ## When to invoke - Diagnosing UI slowness, scroll hitches, or app hangs. - Investigating high memory usage, leaks, or large binary size. - Wiring MetricKit to receive field performance data from real devices. - Setting up `XCTMetric` / `measure {}` baselines in CI. - Deciding whether to move work off `@MainActor` and how to do it safely. - Evaluating launch time before a release. ## Instruments — the primary measurement tool Never guess at a performance problem; profile first. Instruments ships with Xcode. Key templates: **Time Profiler** — samples the call stack at ~1 kHz. Reveals which functions consume CPU time. After recording, invert the call tree and hide system libraries to surface your own hot paths. A function taking >5 ms on the main thread in an interactive path is a candidate for offloading. **Allocations** — tracks every heap allocation. Use the "Generation" feature: take a snapshot before an action, perform the action repeatedly, take another snapshot, and diff. Any allocation that grew unboundedly across generations is a leak or an accumulation bug. The "Leaks" instrument detects reference cycles automatically but misses logical leaks (objects kept alive longer than needed). **SwiftUI instrument** — records View body invocation counts, `@State` change propagation, and diffing cost. Xcode 26 introduced a next-generation SwiftUI instrument that tracks the causes of each update. A body that fires more than expected usually mea