Open wiistriker opened 8 years ago
When i use rootSavingContext NSFRC delegate methods called in background thread defaultContext NSFRC delegate methods called in mainThread.
So now i wrap all code in NSFetchedResultsController delegate methods with [[NSOperationQueue mainQueue] addOperationWithBlock and it seems it work just fine (for first look)
But it still feeling that i miss something and just doing it wrong for some reason
The issue is not related to MagicalRecord. There is a bug in Core Data. request.fetchBatchSize ignored when context used in NSFRC does not connected to PSC (context is child of parent context)
I have about 14k records in my database. I setup NSFRC with fetchBatchSize = 40
If i use MR_defaultContext
It seems CoreData load all my 14k in memory
My app freeze and memory usage is very high. There is no LIMIT 40 for sql query and when i scroll down the list no more new queries was sended to CoreData.
I investigate that if i use rootSavingContext
Everything works very fast and more products loaded while scrolling. Memory usage is also very low.
But with rootSavingContext my tableview going crazy when model was changed. It seems delegate methods of NSFRC doesnt triggered.
Is i miss something? What should i do in this case?