Review SwiftUI and Swift performance
review_swift_performanceIdentify SwiftUI runtime costs that cause dropped frames, slow launches, or stutter in list-heavy screens. Scans the render path for expensive allocations, non-lazy stacks, index-based ForEach, and blocking I/O before shipping.
Instructions
Check for runtime cost that shows up as dropped frames: DateFormatter and JSONDecoder allocated inside body, collections sorted or filtered on every render, ForEach over indices instead of stable identity, non-lazy stacks inside a ScrollView, AsyncImage with no frame, blocking file or network I/O on the render path, and GeometryReader wrapping an entire body. Use when scrolling stutters, launch is slow, or before shipping a list-heavy screen.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the Swift project root (the folder containing Package.swift or the .xcodeproj). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| score | Yes | 0-100 defect density. 100 = no findings. penalty = 10*blockers + 3*serious + 1*minor; capacity = files*10. Comparable across runs on ONE project, not between projects. | |
| counts | Yes | ||
| issues | Yes | Every finding, most severe first. | |
| summary | Yes | One-line plain-language result. | |
| suggestions | Yes | Prioritized next actions, deduplicated by rule — not a restatement of every issue's fix. | |
| files_checked | Yes | Swift files actually scanned. |