Master data - large data sets and very long time load

I have about 5000-7000 objects in my main data store that I want to display in a table. I use the selected result controller and I have no predicates to retrieve. Just sort by integer field. The object consists of several integers and several lines containing from 10 to 50 characters. My problem is that it takes 10 seconds to load the view. This is normal?

I believe that FRC processes large data sets and processes batches and such things to allow large data sets. Are there any common pitfalls or something like that, because I'm really at a dead end. I disabled the application to one kind of table, but it still takes about 10 seconds to download. And I leave the table view as the default style and just display the row in the cell.

Any advice would be greatly appreciated!

+4
source share
2 answers

In your fetch request, did you use -setFetchBatchSize: to minimize the number of items received immediately (usually the number of items on the screen, plus a few for the buffer)? Without this, you won’t see so much of the benefit of using NSFetchedResultsController for your table view.

You can also limit the properties obtained with -setPropertiesToFetch: in a select request. Perhaps it’s best to limit the selection to only those properties of your objects that will affect their display in the table view. The rest can be lazy loaded later when you need them.

+3
source

Have you checked the index flag for the integer that you are sorting in your Core Data model?

+4
source

All Articles