InfiniteLayout icon indicating copy to clipboard operation
InfiniteLayout copied to clipboard

UICollectionViewDataSourcePrefetching seems to be broken

Open jspavlick opened this issue 4 years ago • 1 comments

func collectionView(_ collectionView: UICollectionView, prefetchItemsAt indexPaths: [IndexPath]) and func collectionView(_ collectionView: UICollectionView, cancelPrefetchingForItemsAt indexPaths: [IndexPath]) are called repeatedly with the same values, making it almost entirely useless.

Has anyone encountered this? Or am I using this library incorrectly?

jspavlick avatar Jan 26 '21 16:01 jspavlick

Yes I see the same problem with very large collections and when scrolling very fast. I get repeated calls to prefetch / cancel prefetch for the same indexpaths. I'm only scrolling in ONE direction, no reversals. Some indexpaths are included in these repeated calls 2 and 3 times which slows things down for no reason.

berarduc avatar Jul 02 '22 16:07 berarduc