Issues with Data Quantities
As discussed in Under the Hood, Core Data uses transaction logs to keep multiple persistent stores in sync with each other. Because of that design and because of the latency of networking, there’s an upper limit to the frequency in which we can create entities and save them to our Core Data application. The exact numbers are difficult to determine, but it’s safe to say that if we’re generating hundreds of entities per save, we may run into a performance problem.
Whenever we create an NSManagedObject and save the NSManagedObjectContext or the UIManagedDocument, a transaction log is created for that instance. The more entities we create, the larger that transaction log becomes. There’s an upper threshold whereby the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access