I will keep this question common for now and avoid cluttering this code.
I have an iOS application that uses Core Data ( sqlite
) for its data store. The model is quite complex, with a large hierarchy of objects. When I retrieve and import these large datasets, I notice that the application crashes after a while due to a memory warning.
The Allocations profiler shows me excessive "temporary" virtual machines: sqlite
page objects. The size of it grows and grows, but NEVER falls. I tried to ensure that all of my NSManagedObjectContext
stored inside executeBlock calls.
It seems to me that there are object contexts that are not freed and / or reset.
I tried to disable undoManager in NSManagedObjectContext
. setting stalenessInterval to a very low value (1.0) and calling reset on my MOC after they are done while saving the data upon import.
What does it mean when the short-term cache file of the temporary sqlite
VM continues to grow so high? What needs to be done to reduce page cache?
What is the acceptable size for this cache in a large Core Data application?
Thanks,
source share