I’m currently using NSFetchedResultController to get the to displayed data.
However I’ve got two question about it:
1) When I set the fetchSizeBatch property to 2, my app always crashes.
What does fetchSizeBatch actually mean? I don’t really want to set it to 2, I was just playing with it and noticed that bug.
2) My app currently uses about 25 MB of memory while scrolling through the UITableView. I assume NSFetchedResultController is causing that. Is 25 MB still normal? Or is this controller some sort of device specified?
Two is an extremely low number for a Core Data batch size. According to the documentation, which probably explains it much better than I do, setting a batch size means that the data will be processed in batches; in other words, Core Data queries the database for the sorted results but only pulls the amount specified by the batch size into managed objects. The implementation of this – and this is the big part – is a proxy subclass of NSArray which will page in items from each batch whenever they’re accessed, either by index, enumeration, whatever. In your case, this means that Core Data is taking a round trip back to the database every two objects. For an NSFetchedResultsController talking to a UITableView, you can see how much of a problem this is.
Otherwise, 25MB isn’t fantastic, but I’ve seen apps do much worse. I would say you’re good.