Because of complex filtering and sorting I use custom object(not managed object) as parent of managed object. Sorry, I forgot to mention this important detail
You should try to move filtering and sorting to be a predicate
and sortDescriptors
of NSFetchRequest
. Then you could use fetchBatchSize
to limit the number of objects which are simultaneously fetched from the persistent store and kept in memory.