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
Give back control to collection layout objects and eliminate layout inspector, layout facilitator, etc.
Have ASDataController, ASRangeController and ASCollectionLayouts to be decoupled from ASCollectionView and instead rely on ASCollectionNode. With this, we'll be able to do the initial reloadData, prepare collection layout and preload cells before the view is even allocated.
Introduce measure range (and even allocate range in the far future): ASDataController won't allocate and measure all cell nodes in one go, but instead refer to its layout delegate, such as ASCollection(Gallery|Pager)LayoutDelegate (Improve collection datasource performance #186).
Interface-state-aware ASCollectionNode:
When a collection node enters preload state, it triggers the initial reloadData and then preloads "visible" cells. Those cells should be in preload state and start fetching images, etc. A collection node that is in preload state should have its own visible range of 0, display range of 0 and preload range of 1.
When it enters display state, it allocates its collection view and renders. Its visible range at this stage is 0, render range is 1 and preload range is bigger than that.
When it finally enters visible range, its visible cells should all be ready and it uses the normal ranges.
With this system, nest collection nodes (e.g closeup) will be much better supported. Currently we can't perform initial reloadData, prepare the collection layouts and preload visible cells (e.g pin image) of sub-collection-cell-nodes (e.g close gallery cell) until they enter display range of the containing collection (e.g closeup gallery pager) and have their view allocated.
All of these projects won't be realized without the help and feedbacks of core team members, especially @Adlai-Holler, as well as other community members. So please leave comments!
From @nguyenhuy on March 24, 2017 20:45
I'd like to share my vision of ASCollectionNode, now that we have facebookarchive/AsyncDisplayKit#3017 and facebookarchive/AsyncDisplayKit#3130 in pretty good shape to form a foundation of the following projects:
ASDataController
,ASRangeController
andASCollectionLayout
s to be decoupled fromASCollectionView
and instead rely onASCollectionNode
. With this, we'll be able to do the initialreloadData
, prepare collection layout and preload cells before the view is even allocated.ASDataController
won't allocate and measure all cell nodes in one go, but instead refer to its layout delegate, such asASCollection(Gallery|Pager)LayoutDelegate
(Improve collection datasource performance #186).ASCollectionNode
:reloadData
and then preloads "visible" cells. Those cells should be in preload state and start fetching images, etc. A collection node that is in preload state should have its own visible range of 0, display range of 0 and preload range of 1.reloadData
, prepare the collection layouts and preload visible cells (e.g pin image) of sub-collection-cell-nodes (e.g close gallery cell) until they enter display range of the containing collection (e.g closeup gallery pager) and have their view allocated.All of these projects won't be realized without the help and feedbacks of core team members, especially @Adlai-Holler, as well as other community members. So please leave comments!
Copied from original issue: facebookarchive/AsyncDisplayKit#3219
The text was updated successfully, but these errors were encountered: