You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lot of the time, when something changes in the data model, the existing cell node can be updated to account for it rather than actually calling -[UICollectionView reloadItemsAtIndexPaths:] which causes a new cell node to be created, and a ton of overhead.
Maybe when they call reloadItemsAtIndexPaths: on us, we can call- (BOOL)shouldReload on all the nodes for the reloaded items and give them a chance to update themselves and prevent the reload.
I love this idea. This new API will also work nicely with relayout, because most cell nodes can update to adopt to a new size range. The way relayout works right now is, at best, not ideal and is destined for a revisit soonish.
I'm not entirely sure, but we may need it to be -(BOOL)shouldReloadForSizeRange:(ASSizeRange).
Thanks for thinking through this one @Adlai-Holler. 👍
This sounds great for us as we often have minor changes to cells when updates are removed or reordered in Buffer queues. When that occurs then we usually have to reload the whole cell when really the only visual change is the time label for when the post is scheduled to go out.
From @Adlai-Holler on February 23, 2017 18:49
A lot of the time, when something changes in the data model, the existing cell node can be updated to account for it rather than actually calling
-[UICollectionView reloadItemsAtIndexPaths:]
which causes a new cell node to be created, and a ton of overhead.Maybe when they call
reloadItemsAtIndexPaths:
on us, we can call- (BOOL)shouldReload
on all the nodes for the reloaded items and give them a chance to update themselves and prevent the reload.Thoughts @nguyenhuy @garrettmoon @maicki @appleguy @ay8s
Copied from original issue: facebookarchive/AsyncDisplayKit#3067
The text was updated successfully, but these errors were encountered: