Unexpected UI Lockup When Using ScrollView with LazyVStack on iPhone 12
I'm optimizing some code but I'm wondering if anyone has experience with I've searched everywhere and can't find a clear answer... I'm experiencing a important UI lockup when scrolling through a `ScrollView` that contains a `LazyVStack` in my SwiftUI app running on an iPhone 12. When I scroll quickly, the interface becomes unresponsive for a few seconds. I've tried optimizing the way I'm loading data by loading only the necessary items, but the question continues. Here's a snippet of my implementation: ```swift struct ContentView: View { @State private var items: [String] = Array(repeating: "Item", count: 1000) var body: some View { ScrollView { LazyVStack { ForEach(items, id: \.self) { item in Text(item) .padding() .background(Color.gray.opacity(0.1)) .cornerRadius(8) } } .padding() } } } ``` I've also profiled the app using Instruments and noticed that there are spikes in CPU usage when scrolling. At the same time, I see the following behavior in the console: `UIConsistency behavior: Layout was not applied because it is not in a valid state`. I've ensured that my views are lightweight and don't contain complex calculations, yet the scenario remains. Is there something I'm missing, or is there a known scenario with `LazyVStack` in high-item count scenarios? Any advice on how to improve this performance would be greatly appreciated. This is part of a larger API I'm building. Am I missing something obvious? Thanks for any help you can provide!