enumerate() is SwiftData's answer to processing large datasets in batches. The concept is solid, though it's worth profiling in your own project to make sure memory behaves as expected: www.hackingwithswift.com/quick-start/...
Learn Swift coding for iOS with these free tutorials