Layout refresh too many times in ASTableNode and ASCollectionView in 2.2
I noticed this in my application and I am able to reproduce this in the LayoutSpecExamples-Swift example itself. Either reloadData, reloadSection, or something else is causing layout refresh and reloading table and collections 3 to 4 times as opposed to only 1. Same code works perfectly in ASDK 2.1.
Example LayoutSpecExamples-Swift (ASDK 2.2 Master) Add print in numberOfRowsInSection and nodeForRowAt methods in OverviewViewController
OverviewViewController: numberOfRowsInSection: 4
OverviewViewController: numberOfRowsInSection: 4
OverviewViewController: nodeForRowAt, indexPath = 0
OverviewCellNode: init
OverviewViewController: nodeForRowAt, indexPath = 1
OverviewCellNode: init
OverviewViewController: nodeForRowAt, indexPath = 2
OverviewCellNode: init
OverviewViewController: nodeForRowAt, indexPath = 3
OverviewCellNode: init
OverviewViewController: numberOfRowsInSection: 4
OverviewViewController: nodeForRowAt, indexPath = 0
OverviewCellNode: init
OverviewViewController: nodeForRowAt, indexPath = 1
OverviewCellNode: init
OverviewViewController: nodeForRowAt, indexPath = 2
OverviewCellNode: init
OverviewViewController: nodeForRowAt, indexPath = 3
OverviewCellNode: init
OverviewViewController: numberOfRowsInSection: 4
OverviewViewController: nodeForRowAt, indexPath = 0
OverviewCellNode: init
OverviewViewController: nodeForRowAt, indexPath = 1
OverviewCellNode: init
OverviewViewController: nodeForRowAt, indexPath = 2
OverviewCellNode: init
OverviewViewController: nodeForRowAt, indexPath = 3
OverviewCellNode: init
numberOfRowsInSection getting called 4 times (instead of 1).. and nodeForRowAt is getting called 4x times .. hence OverviewCellNode getting initialized 12 times instead of 4!!
In ASDK 2.1, numberOfRowsInSection is only called once and only 4 instances of OverviewCellNode are created
This issue was moved to TextureGroup/Texture#201