Roobiq / RBQFetchedResultsController

Drop-in replacement for NSFetchedResultsController backed by Realm.
MIT License
476 stars 70 forks source link

[Question] Does RBQFetchedResultsController offer batchFetching? #54

Closed jasper-ch-chan closed 8 years ago

jasper-ch-chan commented 8 years ago

I was wondering if anyone knows this plugin offers batchFetching? If not, what are some workarounds are available? Will batchFetching be a functionality offered in the future?

bigfish24 commented 8 years ago

Could you describe further what you are hoping to accomplish? The reason being is I am confused on what you mean by batch fetching.

jasper-ch-chan commented 8 years ago

Batch fetching allows the user to limit the amount of hits a fetch can return for performance reasons. In Core Data, it is also implemented such that when the user needs more data (via scrolling), CD will automatically fetch the next batch of data. It is guaranteed that it will always return the data fast enough to ensure the UI can show the next set of data

https://developer.apple.com/library/mac/documentation/Cocoa/Reference/CoreDataFramework/Classes/NSFetchRequest_Class/#//apple_ref/occ/instp/NSFetchRequest/fetchBatchSize

bigfish24 commented 8 years ago

@jasper-ch-chan Realm works differently than CD/SQLite and doesn't actually need to do any fetching. The data is lazy loaded only when accessed, thus there is no concept of paging the query results.

So unless I am missing something, you shouldn't need this feature.

bigfish24 commented 8 years ago

Going to close this for now, feel free to open if the question is still valid.