axiom-swiftui-performance▌
charleswiltgen/axiom · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Use when:
SwiftUI Performance Optimization
When to Use This Skill
Use when:
- App feels less responsive (hitches, hangs, delayed scrolling)
- Animations pause or jump during execution
- Scrolling performance is poor
- Profiling reveals SwiftUI is the bottleneck
- View bodies are taking too long to run
- Views are updating more frequently than necessary
- Need to understand cause-and-effect of SwiftUI updates
Example Prompts
These are real questions developers ask that this skill is designed to answer:
1. "My app has janky scrolling and animations are stuttering. How do I figure out if SwiftUI is the cause?"
→ The skill shows how to use the new SwiftUI Instrument in Instruments 26 to identify if SwiftUI is the bottleneck vs other layers
2. "I'm using the new SwiftUI Instrument and I see orange/red bars showing long updates. How do I know what's causing them?"
→ The skill covers the Cause & Effect Graph patterns that show data flow through your app and which state changes trigger expensive updates
3. "Some views are updating way too often even though their data hasn't changed. How do I find which views are the problem?"
→ The skill demonstrates unnecessary update detection and Identity troubleshooting with the visual timeline
4. "I have large data structures and complex view hierarchies. How do I optimize them for SwiftUI performance?"
→ The skill covers performance patterns: breaking down view hierarchies, minimizing body complexity, and using the @Sendable optimization checklist
5. "We have a performance deadline and I need to understand what's slow in SwiftUI. What are the critical metrics?"
→ The skill provides the decision tree for prioritizing optimizations and understands pressure scenarios with professional guidance for trade-offs
Overview
Core Principle: Ensure your view bodies update quickly and only when needed to achieve great SwiftUI performance.
NEW in WWDC 2025: Next-generation SwiftUI instrument in Instruments 26 provides comprehensive performance analysis with:
- Visual timeline of long updates (color-coded orange/red by severity)
- Cause & Effect Graph showing data flow through your app
- Integration with Time Profiler for CPU analysis
- Hangs and Hitches tracking
Key Performance Problems:
- Long View Body Updates — View bodies taking too long to run
- Unnecessary View Updates — Views updating when data hasn't actually changed
iOS 26 Framework Performance Improvements
"Performance improvements to the framework benefit apps across all of Apple's platforms, from our app to yours." — WWDC 2025-256
SwiftUI in iOS 26 includes major performance wins that benefit all apps automatically. These improvements work alongside the new profiling tools to make SwiftUI faster out of the box.
List Performance (macOS Focus)
Massive gains for large lists
- 6x faster loading for lists of 100,000+ items on macOS
- 16x faster updates for large lists
- Even bigger gains for larger lists
- Improvements benefit all platforms (iOS, iPadOS, watchOS, not just macOS)
List(trips) { trip in // 100k+ items
TripRow(trip: trip)
}
// iOS 26: Loads 6x faster, updates 16x faster on macOS
// All platforms benefit from performance improvements
Impact on your app
- Large datasets (10k+ items) see noticeable improvements
- Filtering and sorting operations complete faster
- Real-time updates to lists are more responsive
- Benefits apps like file browsers, contact lists, data tables
Scrolling Performance
Reduced dropped frames during high-speed scrolling
SwiftUI has improved scheduling of user interface updates on iOS and macOS. This improves responsiveness and lets SwiftUI do even more work to prepare for upcoming frames. All in all, it reduces the chance of your app dropping a frame while scrolling quickly at high frame rates.
Key improvements
- Better frame scheduling — SwiftUI gets more time to prepare for upcoming frames
- Improved responsiveness — UI updates scheduled more efficiently
- Fewer dropped frames — Especially during quick scrolling at 120Hz (ProMotion)
When you'll notice
- Scrolling through image-heavy content
- High frame rate devices (iPhone Pro, iPad Pro with ProMotion)
- Complex list rows with multiple views
Nested ScrollViews with Lazy Stacks
Photo carousels and multi-axis scrolling now properly optimize
ScrollView(.horizontal) {
LazyHStack {
ForEach(photoSets) { photoSet in
ScrollView(.vertical) {
LazyVStack {
ForEach(photoSet.photos) { photo in
PhotoView(photo: photo)
}
}
}
}
}
}
// iOS 26: Nested scrollviews now properly delay loading with lazy stacks
// Great for photo carousels, Netflix-style layouts, multi-axis content
Before iOS 26 Nested ScrollViews didn't properly delay loading lazy stack content, causing all nested content to load immediately.
After iOS 26 Lazy stacks inside nested ScrollViews now delay loading until content is about to appear, matching the behavior of single-level ScrollViews.
Use cases
- Photo galleries with horizontal/vertical scrolling
- Netflix-style category rows
- Multi-dimensional data browsers
- Image carousels with vertical detail scrolling
SwiftUI Performance Instrument Enhancements
New lanes in Instruments 26
The SwiftUI instrument now includes dedicated lanes for:
- Long View Body Updates — Identify expensive body computations
- Platform View Updates — Track UIKit/AppKit bridging performance (Long Representable Updates)
- Other Long Updates — All other types of long SwiftUI work
These lanes are covered in detail in the next section.
Performance Improvement Summary
Automatic wins (recompile only)
- ✅ 6x faster list loading (100k+ items, macOS)
- ✅ 16x faster list updates (macOS)
- ✅ Reduced dropped frames during scrolling
- ✅ Improved frame scheduling on iOS/macOS
- ✅ Nested ScrollView lazy loading optimization
No code changes required — rebuild with iOS 26 SDK to get these improvements.
Cross-reference SwiftUI 26 Features (swiftui-26-ref skill) — Comprehensive guide to all iOS 26 SwiftUI changes
The SwiftUI Instrument (Instruments 26)
Getting Started
Requirements:
- Install Xcode 26
- Update devices to latest OS releases (support for recording SwiftUI traces)
- Build app in Release mode for accurate profiling
Launch:
- Open project in Xcode
- Press Command-I to profile
- Choose SwiftUI template from template chooser
- Click Record button
Template Contents
The SwiftUI template includes three instruments:
- SwiftUI Instrument (NEW) — Identifies performance issues in SwiftUI code
- Time Profiler — Shows CPU work samples over time
- Hangs and Hitches — Tracks app responsiveness
SwiftUI Instrument Track Lanes
Lane 1: Update Groups
- Shows when SwiftUI is actively doing work
- Empty during CPU spikes? → Problem likely outside SwiftUI
Lane 2: Long View Body Updates
- Highlights when
bodyproperty takes too long - Most common performance issue — start here
Lane 3: Long Representable Updates
- Identifies slow UIViewRepresentable/NSViewRepresentable updates
- UIKit/AppKit integration performance
Lane 4: Other Long Updates
- All other types of long SwiftUI work
Color-Coding System
Updates shown in orange and red based on likelihood to cause hitches:
- Red — Very likely to contribute to hitch/hang (investigate first)
- Orange — Moderately likely to cause issues
- Gray — Normal updates, not concerning
Note: Whether updates actually result in hitches depends on device conditions, but red updates are the highest priority.
Understanding the Render Loop
Normal Frame Rendering
Frame 1:
├─ Handle events (touches, key presses)
├─ Update UI (run view bodies)
│ └─ Complete before frame deadline ✅
├─ Hand off to system
└─ System renders → Visible on screen
Frame 2:
├─ Handle events
├─ Update UI
│ └─ Complete before frame deadline ✅
├─ Hand off to system
└─ System renders → Visible on screen
Result: Smooth, fluid animations
Frame with Hitch (Long View Body)
Frame 1:
├─ Handle events
├─ Update UI
│ └─ ONE VIEW BODY TOO SLOW
│ └─ Runs past frame deadline ❌
├─ Miss deadline
└─ Previous frame stays visible (HITCH)
Frame 2: (Delayed)
├─ Handle events (delayed by 1 frame)
├─ Update UI
├─ Hand off to system
└─ System renders → Finally visible
Result: Previous frame visible for 2+ frames = animation stutter
Frame with Hitch (Too Many Updates)
Frame 1:
├─ Handle events
├─ Update UI
│ ├─ Update 1 (fast)
│ ├─ Update 2 (fast)
│ ├─ Update 3 (fast)
│ ├─ ... (100 more fast updates)
│ └─ Total time exceeds deadline ❌
├─ Miss deadline
└─ Previous frame stays visible (HITCH)
Result: Many small updates add up to miss deadline
Key Insight: View body runtime matters because missing frame deadlines causes hitches, making animations less fluid.
Reference:
- Understanding hitches in your app
- Tech Talk on render loop and fixing hitches
Problem 1: Long View Body Updates
Identifying Long Updates
- Record trace in Instruments with SwiftUI template
- Look at Long View Body Updates lane — any orange/red bars?
- Expand SwiftUI track to see subtracks
- Select View Body Updates subtrack
- Filter to long updates:
- Detail pane → Dropdown → Choose "Long View Body Updates summary"
Analyzing with Time Profiler
Workflow:
- Find long update in Long View Body Updates summary
- Hover over view name → Click arrow → "Show Updates"
- Right-click on long update → "Set Inspection Range and Zoom"
- Switch to Time Profiler instrument track
What you see:
- Call stacks for samples recorded during view body execution
- Time spent in each frame (leftmost column)
- Your view body nested in deep SwiftUI call stack
Finding the bottleneck:
- Option-click to expand main thread call stack
- Command-F to search for your view name (e.g., "LandmarkListItemView")
- Identify expensive operations in time column
Common Expensive Operations
Formatter Creation (Very Expensive)
❌ WRONG - Creating formatters in view body:
struct LandmarkListItemView: View {
let landmark: Landmark
@State private var userLocation: CLLocation
var distance: String {
// ❌ Creating formatters every time body runs
let numberFormatter = NumberFormatter()
numberFormatter.maximumFractionDigits = 1
let measurementFormatter = MeasurementFormatter()
measurementFormatter.numberFormatter = numberFormatter
let meters = userLocation.distance(from: landmark.location)
let measurement = Measurement(value: meters, unit: UnitLength.meters)
return measurementFormatter.string(from: measurement)
}
var body: some View {
HStack {
Text(landmark.name)
Text(distance) // Calls expensive distance property
}
}
}
Why it's slow:
- Formatters are expensive to create (milliseconds each)
- Created every time view body runs
- Runs on main thread → app waits before continuing UI updates
- Multiple views → time adds up quickly
✅ CORRECT - Cache formatters centrally:
@Observable
class LocationFinder {
private let formatter: MeasurementFormatter
private let landmarks: [Landmark]
private var distanceCache: [Landmark.ID: String] = [:]
init(landmarks: [Landmark]) {
self.landmarks = landmarks
// Create formatters ONCE during initialization
let numberFormatter = NumberFormatter()
numberFormatter.maximumFractionDigits = 1
How to use axiom-swiftui-performance on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add axiom-swiftui-performance
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches axiom-swiftui-performance from GitHub repository charleswiltgen/axiom and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate axiom-swiftui-performance. Access the skill through slash commands (e.g., /axiom-swiftui-performance) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.6★★★★★37 reviews- ★★★★★Anaya Rao· Dec 28, 2024
We added axiom-swiftui-performance from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Yash Thakker· Dec 24, 2024
axiom-swiftui-performance has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Alexander Rahman· Dec 4, 2024
Useful defaults in axiom-swiftui-performance — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Kaira Robinson· Nov 23, 2024
I recommend axiom-swiftui-performance for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Michael Gupta· Nov 19, 2024
axiom-swiftui-performance fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Chaitanya Patil· Nov 15, 2024
axiom-swiftui-performance reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Kaira Choi· Oct 14, 2024
Keeps context tight: axiom-swiftui-performance is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Michael Agarwal· Oct 10, 2024
axiom-swiftui-performance has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Oshnikdeep· Oct 6, 2024
We added axiom-swiftui-performance from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Sophia Tandon· Sep 25, 2024
I recommend axiom-swiftui-performance for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
showing 1-10 of 37