SwiftLee

SwiftLee's SwiftUI Performance: Find Redraws in Xcode Instruments

Original post SwiftUI Performance: Find Redraws in Xcode Instruments

Article Summary

Antoine van der Lee reveals how SwiftUI performance problems hide in plain sight. Most developers know views redraw too often, but measuring the actual cost requires knowing exactly where to look in Instruments.

This deep dive from SwiftLee walks through the complete workflow for finding and fixing SwiftUI redraw issues using Xcode Instruments. It covers the SwiftUI template, interpreting the View Body Updates track, and tracing redraws back to their root causes.

Key Takeaways

Critical Insight

Finding expensive SwiftUI redraws requires combining update frequency with duration metrics in Instruments, then tracing root causes back to the triggering dependencies.

Continue reading

What This Article Covers

Problem

Antoine van der Lee ran the RocketTrace Slow Lab workload, which published 600 state changes at roughly 60 Hz. This triggered a 27-second recording with 228 long updates, totaling 1.10 seconds.

Solution

He picked a timeline range and looked through the View Body Updates hierarchy. WorkloadCard cost 8.35 ms and InvalidationWorkloadCard cost 6.71 ms, out of 24.53 ms total.

Impact

The table showed InvalidationWorkloadCard and WorkloadCard bodies firing repeatedly, each only 40-50 microseconds. That cumulative main-thread cost came from these frequent, cheap updates adding up.

The article includes a specific example where 228 long updates added up to 1.10 seconds in just 27 seconds of recording.

This page summarizes “SwiftUI Performance: Find Redraws in Xcode Instruments” by SwiftLee, published Oct 19, 2026. All credit for the original work goes to the authors.

Read the original on avanderlee.com (opens in new tab)

AI tools for iOS

Browse all AI tools →