Individual Author May 5, 2025

SwiftUI Scroll Performance: The 120FPS Challenge

Article Summary

Jacob Bartlett from Jacob's Tech Tavern puts SwiftUI scroll performance under the microscope. Can it really hit 120fps with complex infinite feeds, or does the magic come at too high a cost?

This deep-dive profiles three SwiftUI scrolling approaches (VStack, LazyVStack, and List) using Instruments on Low Power Mode with 1,000 complex cells. Bartlett tests both fixed and dynamic cell heights, measuring frame drops, memory usage, and real-world performance to find the smoothest solution.

Key Takeaways

Critical Insight

List outperforms LazyVStack for infinite feeds by leveraging UIKit's battle-tested UICollectionView with proper cell recycling, especially with dynamic content heights.

The article reveals an undocumented SwiftUI optimization technique involving memcmp-style comparisons that most developers don't know exists.

About This Article

Problem

Jacob Bartlett found that LazyVStack doesn't estimate dynamic heights well under pressure. When users scroll rapidly through 1,000 cells with different heights, the scroll gets glitchy and memory spikes.

Solution

Bartlett switched to List, which relies on UICollectionView and handles cell recycling properly. He also added image caching with Nuke or Kingfisher to stop AsyncImage from refetching the same images on re-renders.

Impact

List runs at a steady 60fps on Low Power Mode with only one or two frame drops during fast scrolling. LazyVStack visibly slows down in the same scenario. Memory stays flat throughout the 1,000-item scroll without any spikes.

Recent from Individual Author

Related Articles

AI Tools for iOS

Browse all AI tools →