TheNounProject / CollectionView

An easy to use, highly customizable replacement for NSCollectionView.
MIT License
121 stars 16 forks source link

[Feature request] Prefetch cells before display. Like NSCollectionView prefetchDataSource. #18

Open xjbeta opened 5 years ago

xjbeta commented 5 years ago

https://developer.apple.com/documentation/appkit/nscollectionviewprefetching It's useful for load data like large images.

WCByrne commented 5 years ago

I did explore something like this a while back, using the built in "overdraw" features of NSScrollView, but it wasn't very clean and bogged things down. Thinking on it again though, I wonder if the issue was trying to pre-load the cells and add them to the scroll view. Maybe preparing the cells and holding onto them for future layout passes would be the better option 🤔. But it's not quite that straight forward to determine when to prepare and how long you should hold onto those cells, what if you scroll the other way?