performance-audit

Featured

Audit and improve SwiftUI runtime performance. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory usage, excessive view updates, or layout thrash in SwiftUI apps.

API & Backend 436 stars 36 forks Updated today MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
88
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# SwiftUI Performance Audit ## Overview Audit SwiftUI view performance from instrumentation and baselining to root-cause analysis and concrete remediation steps. ## Workflow Decision Tree 1. **If user provides code**: Start with Code-First Review 2. **If user only describes symptoms**: Ask for minimal code/context, then Code-First Review 3. **If code review is inconclusive**: Guide user to profile with Instruments ## 1. Code-First Review ### Collect - Target view/feature code - Data flow: state, environment, observable models - Symptoms and reproduction steps ### Focus On - View invalidation storms from broad state changes - Unstable identity in lists (`id` churn, `UUID()` per render) - Heavy work in `body` (formatting, sorting, image decoding) - Layout thrash (deep stacks, `GeometryReader`, preference chains) - Large images without downsampling - Over-animated hierarchies (implicit animations on large trees) ### Provide - Likely root causes with code references - Suggested fixes and refactors - Minimal repro or instrumentation suggestion if needed ## 2. Guide User to Profile If code review is inconclusive, explain how to collect data: 1. Use SwiftUI template in Instruments (Release build) 2. Reproduce the exact interaction (scroll, navigation, animation) 3. Capture SwiftUI timeline and Time Profiler 4. Export or screenshot relevant lanes and call tree Ask for: - Trace export or screenshots - Device/OS/build configuration ## 3. Common Code Smells (and Fixes) ###...

Details

Author
termio-sh
Repository
termio-sh/termio
Created
3 months ago
Last Updated
today
Language
Swift
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category