From 5ecc9b16a927d26c0be5fafe8fe28118ad6ec3ad Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Tue, 1 Mar 2016 15:42:49 -0800 Subject: [PATCH] Remove unncessary batch layout calls in ASCollectionDataController - These calls cause supplementary nodes to be allocated and laid out, but not inserted afterward. So the nodes are thrown away. - Next time when it is the right time to allocate these nodes, it is the second allocation request and triggers assertion in ASIndexedNodeContext #1296. --- AsyncDisplayKit/Details/ASCollectionDataController.mm | 9 --------- 1 file changed, 9 deletions(-) diff --git a/AsyncDisplayKit/Details/ASCollectionDataController.mm b/AsyncDisplayKit/Details/ASCollectionDataController.mm index 121098a6ad..7026024ff8 100644 --- a/AsyncDisplayKit/Details/ASCollectionDataController.mm +++ b/AsyncDisplayKit/Details/ASCollectionDataController.mm @@ -46,9 +46,6 @@ NSMutableArray *contexts = [NSMutableArray array]; [self _populateSupplementaryNodesOfKind:kind withMutableContexts:contexts]; _pendingContexts[kind] = contexts; - - // Measure loaded nodes before leaving the main thread - [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:nil]; } } @@ -85,9 +82,6 @@ NSMutableArray *contexts = [NSMutableArray array]; [self _populateSupplementaryNodesOfKind:kind withSections:sections mutableContexts:contexts]; _pendingContexts[kind] = contexts; - - // Measure loaded nodes before leaving the main thread - [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:nil]; } } @@ -123,9 +117,6 @@ NSMutableArray *contexts = [NSMutableArray array]; [self _populateSupplementaryNodesOfKind:kind withSections:sections mutableContexts:contexts]; _pendingContexts[kind] = contexts; - - // Measure loaded nodes before leaving the main thread - [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:nil]; } }