Skip to content

UICollectionViewDataSourcePrefetching seems to be broken #26

Open
@jspavlick

Description

@jspavlick

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?

Activity

berarduc

berarduc commented on Jul 2, 2022

@berarduc

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      UICollectionViewDataSourcePrefetching seems to be broken · Issue #26 · arnauddorgans/InfiniteLayout