How often should I call NSManagedObjectContext save when inserting objects into a loop?

I did not find any guidance in the apple docs on how to save data with a granular core.

If I am inside a loop and insert several new objects into the main data, how often should I call [NSManagedObjectContext save] ? Do I have to persist in each iteration or only once after all the inserts are complete? What if 1000 objects are inserted?

+4
source share
1 answer

When importing large amounts of data, memory and performance should be considered.

See Master Data Programming Guide - Effective Data Import

+3
source