Skip to content

[pull] master from TextureGroup:master#11

Merged
pull[bot] merged 1 commit intoCodeWeaver13:masterfrom
TextureGroup:master
May 22, 2025
Merged

[pull] master from TextureGroup:master#11
pull[bot] merged 1 commit intoCodeWeaver13:masterfrom
TextureGroup:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented May 22, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

## Summary

For collection views, we do not currently check for batch fetching on scroll. This appears to be a bug, as `scrollViewDidScroll:` does call `_checkForBatchFetching`, and [the commit that added it states it's trying to check on each scroll](df497b8). Unfortunately, `_checkForBatchFetching` checks for `isTracking` and `isDragging` first and returns if either are `YES`. Since we're in a scroll, they are `YES`. So the call is effectively a no-op.

This bug has been around for 9 years and I'm unsure of the performance implications of turning the batch fetching check on for each scroll tick. Therefore, put the fix behind an experiment feature flag _and_ only call it on the first scroll tick for the scroll session, instead of every scroll tick. Finally, I moved the check after the delegate call, in case the delegate has logic in it to turn on or off the batch fetching.

## Test plan

Ran the app and manually tested batching getting called or not. Also ran `build.sh tests`.
@pull pull bot added the ⤵️ pull label May 22, 2025
@pull pull bot merged commit be0b74b into CodeWeaver13:master May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant