Quick Bounce Assessor
A performance reviewer for macOS applications (SwiftUI and/or AppKit). The "quick bounce" is the time from launch to the first rendered frame — a clean bounce off the app icon. This skill assesses how quickly an app can render its first frame and how well it sustains a smooth frame budget afterward.
Guiding principle
At the earliest point in the lifecycle, do all non-main-actor-necessary work off the main actor so a single SwiftUI/AppKit frame can render immediately. Publish results back to the main actor when ready.
What it assesses
- Launch path / main-actor I/O — synchronous disk reads, JSON decode,
directory scans, or shell/env parsing running during
init,@StateObject/@Stateconstruction, orapplicationDidFinishLaunchingbefore the first frame. - Strict concurrency posture — whether Swift strict concurrency is enabled;
presence of unverified
@unchecked Sendablepromises. - View-model ↔ business-logic separation — god-object view models mixing UI
state with orchestration/domain rules; appropriate (and inappropriate) use
of
actor. - Steady-state render budget — high-frequency timers mutating
@Publishedstate that invalidate large view trees; per-bodyallocations (DateFormatter,JSONEncoder/JSONDecoder). - App lifecycle & window setup — heavy work in the app delegate / scene
setup; observation model (
@ObservablevsObservableObject).
How to run
- Read
references/PERF_CATALOG.mdfor the anti-pattern → detection → fix catalog. - Optionally run the heuristic scanner against the target project:
It is read-only and advisory (always exits 0). Treat its output as leads to confirm by reading the flagged
Terminal window scripts/scan_launch_path.sh /path/to/projectfile:linelocations. - For each lead, open the file and confirm whether the work truly runs on the
main actor before the first frame (constructors reached from
@StateObject/@State, singletons touched during that construction, app delegate launch methods). - Where possible, verify with Instruments (Time Profiler,
os_signpost) — the scanner finds candidates; Instruments confirms real cost.
Report format
Produce a structured report:
- A one-line verdict on quick-bounce readiness.
- Per finding:
PASS/WARNING/FAIL, the category,file:lineevidence, a short explanation, and a concrete fix. - A phased remediation summary ordered by ROI:
- Clear the first-frame path (move I/O off main; publish back on
@MainActor). - Adopt strict concurrency incrementally (targeted → complete).
- Extract business logic from view models (plain services; actors only for
shared mutable state;
AsyncStreamover Combine). - Fix steady-state render budget (
TimelineView/Canvas, static formatters).
- Clear the first-frame path (move I/O off main; publish back on
Instructions
When invoked to assess a codebase:
- Identify the app type (SwiftUI/AppKit), platform, min OS, and build system.
- Run
scripts/scan_launch_path.shon the project root, then verify each lead by reading the source. - Classify every finding PASS/WARNING/FAIL with
file:lineand a fix, mapping it to one of the five assessment categories. - Emit the phased remediation summary. Recommend
actoronly where shared mutable state genuinely crosses threads; prefer plainSendableservice types andAsyncStreamover adding Combine pipelines.