What problem does it solve?
SwiftUI apps often suffer from janky scrolling, slow rendering, excessive view updates, and layout thrash that are hard to diagnose without a structured approach. This Skill provides a code-first review workflow for common SwiftUI performance anti-patterns and escalates to Instruments profiling guidance when code review is inconclusive.
Core Features & Use Cases
- Code-First Performance Review: Detects view invalidation storms, unstable list identity, heavy work in view bodies, inline sorting/filtering in ForEach, and undownsampled images.
- Instruments Profiling Guidance: Walks through recording with the SwiftUI template, reading Long View Body Updates and Hitches lanes, and correlating with Time Profiler.
- WWDC-Grounded References: Includes distilled guidance from WWDC23 Demystify SwiftUI Performance and Apple Instruments documentation, including _printChanges() debugging and constant view count patterns.
- Use Case: A user reports a stuttering List in their iOS app. The Skill reviews the ForEach code, finds
id: \.self on unstable values and an inline .filter, then recommends stable IDs and a pre-filtered cached collection.
Quick Start
Ask the assistant to review your SwiftUI view code for performance issues causing slow scrolling or excessive view updates.