iOS Platform & SwiftUI (50 Qs)•Part 2: Combine, Persistence, Security & Networking (11 - 24)
How does Core Data Faulting and Batch Operations work?
mid LevelSecurity & Auth
In Simple Words:
- Faulting: Core Data instantiates
NSManagedObjectinstances as lightweight placeholder "faults" without fetching their column data from disk until a property is explicitly accessed, preserving RAM. - Batch Operations (
NSBatchUpdateRequest,NSBatchDeleteRequest): Executes operations directly on the underlying SQLite database file without loading individual objects into memory, speeding up mass updates by 100x.