Running with Scissors
Both of these APIs work by making changes directly on disk. When we utilize either of these APIs, Core Data will construct the appropriate SQL calls and then pass them to SQLite. Nothing gets loaded into memory and therefore the API is executed very quickly, just slightly slower than SQLite itself.
If we can just make changes and/or deletes on disk and avoid having to load them all into memory, why don’t we just do that all of the time?
This API comes at a fairly signficiant cost. The changes that we make on disk aren’t passed to the NSManagedObjectContext instances in our application.
This means that we can very easily make a change to the data on disk and then our NSManagedObjectContext will try to make a different change ...
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