SwiftUI Performance: Pagination
When you implement pagination, instead of allocating every item at the start, we only load the first few (often 20, 50, or 100) into our screen. When you scroll close to the bottom, more data is fetched and displayed.
This is a very common pattern, especially with infinite scrolling feeds—you aren’t exactly loading infinite amounts of data, that’d be impossible. And expensive.
With LazyVStack and List, this will make your initial memory allocations and network I/O far more efficient. A smaller data source may also improve the speed of diffing if your data changes.
Link in first reply.