performance-swiftui-debugging
CommunityDiagnose and fix SwiftUI view performance.
System Documentation
What problem does it solve?
Diagnoses slow, janky, or excessively re-rendering SwiftUI views and guides developers to targeted fixes that reduce CPU work, preserve state, and restore smooth UI updates. It helps identify why bodies are evaluated too often, when view identity causes recreation, and when eager loading or object allocation in body causes stutters.
Core Features & Use Cases
- Re-evaluation analysis: Guidance on using Self._printChanges() and interpreting body evaluation counts to find which dependencies changed.
- Identity & state fixes: Advice for stable .id() usage, conditional branching patterns, and ForEach identifiers to preserve @State and avoid unnecessary recreation.
- Lazy loading & list performance: Recommendations to replace eager containers with LazyVStack/List and to avoid layout patterns that defeat laziness.
- Practical tools: Walkthroughs for Instruments SwiftUI template, os_signpost measurements, and strategies like extracting subviews, using @Observable, Equatable, and moving work off the main thread.
- Use Case: Improve scroll performance in a large list by replacing VStack+ForEach with LazyVStack, fixing image sizing, and eliminating object creation in body.
Quick Start
Tell the skill which SwiftUI view is slow and paste the view code or describe the observed jank and environment (platform, iOS version, and Xcode Instruments data if available).
Dependency Matrix
Required Modules
None requiredComponents
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: performance-swiftui-debugging Download link: https://github.com/AutisticAF/claude-code-apple-dev-plugin/archive/main.zip#performance-swiftui-debugging Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.