axiom analyze swiftui performance

Other Community

Skill notes

Tool Use Is Mandatory

Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning. Run each Grep pattern as written; do not collapse them into one mega-regex. Run the Read verifications each section calls for. "Build a mental model" / "map the architecture" means with tool output in hand, not from memory.

Files to Exclude

Skip: *Tests.swift, *Previews.swift, */Pods/*, */Carthage/*, */.build/*, */DerivedData/*, */scratch/*, */docs/*, */.claude/*, */.claude-plugin/*

Step 3: Identify Update Triggers

Read 3-5 key view files (especially those in scrolling contexts) to understand: What @State/@Binding/@Observable values trigger body re-evaluation? Are there high-frequency update sources? (scroll offset, gesture state, timers) How deep is the view hierarchy in scrolling cells?

Output

Write a brief Performance Context Map (8-10 lines) summarizing: Scrolling contexts and their cell complexity View body hotspots (files with formatters, I/O, image processing) High-frequency update sources Observable/state dependency chains

Phase 2: Detect Known Anti-Patterns

Run all 10 existing detection patterns. For every grep match, use Read to verify the surrounding context before reporting — especially verify the code is actually in a view body, not in .task or a background context.

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Other
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
94 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@CharlesWiltgen · MIT
Token usage
Lean
Setup complexity
Guided setup
External API key
Not required
Operating systems
Unspecified (assume cross-platform)
Runtime requirements
No explicit requirements detected
Detected file/system behavior
  • Read-only
  • Write / modify
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Phase 1: Map View Hierarchy and Rendering Contexts

Phase 1: Map View Hierarchy and Rendering Contexts

02
Step 1: Identify Scrolling Contexts

Step 1: Identify Scrolling Contexts

03
Step 2: Identify View Body Complexity

Step 2: Identify View Body Complexity

04
Step 3: Identify Update Triggers

Read 3-5 key view files (especially those in scrolling contexts) to understand: What @State/@Binding/@Observable values trigger body re-evaluation? Are there high-frequency update sources? (scroll offset, gesture state, timers) How deep is the view hierarchy in scrolling cells?

05
Phase 2: Detect Known Anti-Patterns

Run all 10 existing detection patterns. For every grep match, use Read to verify the surrounding context before reporting — especially verify the code is actually in a view body, not in `.task` or a background context.

06
Phase 3: Reason About Context-Dependent Performance

Using the Performance Context Map from Phase 1 and your domain knowledge, check for issues that depend on *where* the code runs — not just *what* the code does. Question · What it detects · Why it matters Are any of the Phase 2 patterns inside scrolling cell views (List row, LazyVStack item)? · Anti-patterns amplified by scrolling · A formatter in a settings screen costs 1-2ms; the same formatter in a List cell costs 1-2ms × visible rows × scroll velocity

07
Phase 4: Cross-Reference Findings

Bump severity for these combinations: Finding A · + Finding B · = Compound · Severity Formatter in view body · Inside List/ForEach cell · N× per-frame cost during scrolling · CRITICAL File I/O in view body · Inside scrolling context · Main thread blocked per cell · CRITICAL Whole-collection dependency · Large dataset (>100 items) · Every mutation rebuilds entire list · CRITICAL

08
Phase 5: SwiftUI Performance Health Score

Scoring: SMOOTH: No CRITICAL issues, all scrolling cells clean, >90% lazy container usage, no expensive operations in view bodies JANKY: No CRITICAL issues in scrolling contexts, but some expensive operations in bodies or missing lazy loading BROKEN: Any CRITICAL issues in scrolling contexts, or file I/O in view body, or formatters in List cells

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.