Update containers-overview.md

This commit is contained in:
Hannah Troisi
2016-04-17 23:41:06 -07:00
parent af35e5dba7
commit e39e5546ed

View File

@@ -13,11 +13,13 @@ It is highly recommended that you use AsyncDisplayKit's nodes within a node cont
- `ASPagerNode` in place of UIKit's `UIPagerView`
- `ASTableNode` in place of UIKit's `UITableView`
Example code and specific sample projects are highlighted in the documentation for each node container. For details on how to port your existing app to AsyncDisplayKit, read the porting guide (INCLUDE LINK).
Example code and specific sample projects are highlighted in the documentation for each node container.
For a detailed description on porting an existing UIKit app to AsyncDisplayKit, read the <a href = "intelligent-preloading.html">porting guide</a>.
####What do I Gain by Using a Node Container?####
To optimize the performance of an app, AsyncDisplayKit uses <a href = "intelligent-preloading.html">intelligent preloading</a> to determine when content is likely to become visible on-screen. A node container automatically keeps track of the state of its nodes and coordinates with them to trigger layout measurement, fetching data, display and visibility. Each of these operations is triggered independently at an appropriate time, depeneding on how close the content is to coming on-screen. Among other conveniences, this is why it is reccomended to use nodes within a container node.
To optimize the performance of an app, AsyncDisplayKit uses <a href = "intelligent-preloading.html">intelligent preloading</a> to determine when content is likely to become visible on-screen. A node container automatically manages its nodes and coordinates with them to trigger layout measurement, fetching data and display and visibility. Each of these operations is triggered independently at an appropriate time, depeneding on how close the content is to coming on-screen. Among other conveniences, this is why it is reccomended to use nodes within a container node.
In contrast, classes like UIViewController, UITableView, and UICollectionView (which can be thought of as view mamagers) perform the layout measurement, display and visibility operations instaneously, at the moment that the first pixel of their next viewController or cell becomes visible on-screen. This triggers a very large burst of main thread activity that is the cause of most app performance problems.