Building a photo gallery and LazyVGrid was great until I tried scrolling fast through a 50K-
item library. Frame drops, memory spikes during fast flicks, and the prefetch behavior is opaque.
What I tried before giving up on it: - .drawingGroup() — helped on static views, hurt on scrolling -
Manual .id(...) stabilization — no change - Smaller thumbnail decoding — helped some but not
enough - @Observable instead of ObservableObject — minor.
What ended up working: UICollectionView with UIHostingConfiguration cells. Got a stable
60fps. Lost about 200 lines of "pure SwiftUI" pride.
Anyone keep LazyVGrid working at this scale? Curious what I'm missing.
(Project for context: Memories, a Mac→iPhone photo sync app.)