'Is a core data save() after multiple operations the same as a NSBatchInsertRequest?
in core data you can do a number of operations (eg inserting objects) and then managedObjectContext.save() to persist. Is this the same as doing an NSBatchInsertRequest? Does it have any impact on syncing to CloudKit if NSBatchInsertRequest is used as opposed to .save()?
does the save() batch insert?
context: I have a use case where I need to load 10 million records into core data and then have it sync'd with CloudKit. So trying to understand the difference given the issues i'm running into with it. Ive found NSBatchInsert definitely reduces the memory footprint but doesn't have much impact on the core data syncing to CloudKit (it still doesn't sync) or general speed. not sure the underlying mechanics of the save(). It sounds like it just batches the operations together since last save. but if so then how is it different to batch?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
