vendredi 25 mars 2016

Core Data Excessive VM: SQLite page cache

I will keep this question general for now and avoid cluttering this with code.

I have an iOS application that uses Core Data (sqlite) for its data store. The model is fairly complex, with large hierarchy of objects. When I fetch and import these large data sets I am noticing that the application shuts down after awhile due to a memory warning. T

he Allocations profiler shows me excessive "transient" VM: SQLite page objects. The size of this keeps growing and growing but NEVER goes down. I have tried to ensure that all of my NSManagedObjectContext saves occur inside performBlock calls.

It would seem to me as if there are object contexts that are not getting deallocated and / or reset.

I have tried disabling undoManager in NSManagedObjectContext. setting the stalenessInterval to a very low value (1.0), and calling reset on my MOC's after they are done saving data upon import.

What does this mean when the transient VM SQLite page cache continues to go up so high? What needs to be done in order to make the page cache go down?
What is an acceptable size for this cache to get to in a large Core Data application?

Thanks,

Aucun commentaire:

Enregistrer un commentaire