3lvis / DATASource

Core Data's NSFetchedResultsController wrapper for UITableView and UICollectionView
Other
106 stars 27 forks source link

Pagination #107

Closed dneykov closed 7 years ago

dneykov commented 7 years ago

Is it possible to implement lazy loading rows with DATASource because?

Thanks.

3lvis commented 7 years ago

Hi @dneykov,

Could you elaborate with lazy loading rows? Like image loading?

dneykov commented 7 years ago

Hi @3lvis no I don't need image loading. I have a table with 3000 rows now and it takes 3-5 seconds to load whole tableView. I can have more rows to that tableView. When I test it with 10000-12000 rows its really slow. I was thinking of some lazy loading rows. So show first 1000 and when you go bottom to load more rows and so on.

dneykov commented 7 years ago

Maybe the right word is pagination.

3lvis commented 7 years ago

@dneykov Could you try using fetchBatchSize

let request = NSFetchRequest<NSFetchRequestResult>(entityName: Tests.EntityName)
request.sortDescriptors = [NSSortDescriptor(key: "name", ascending: true)]
request.fetchBatchSize = 100
dneykov commented 7 years ago

@3lvis I don't know what to say. Big big thank you. You saved my day. It's loading really fast now.