From a9ecf5d47668cf7c7617e9bfcc25248878501417 Mon Sep 17 00:00:00 2001 From: Jeremy Lawrence Date: Tue, 21 Jan 2020 12:49:39 -0800 Subject: [PATCH] Remove assert from working range handler (#1418) Summary: Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1418 This assert causes crashes on debug builds. While it's known that this algorithm is slow with a large number of items to work through, it doesn't seem to have been an issue for most when working with IGListKit. Removing this assertion to avoid crashes for others. Reviewed By: bdotdub Differential Revision: D19251924 fbshipit-source-id: c0e78d3963544b949bed823bdac9b39529ca5f9f --- Source/IGListKit/Internal/IGListWorkingRangeHandler.mm | 2 -- 1 file changed, 2 deletions(-) diff --git a/Source/IGListKit/Internal/IGListWorkingRangeHandler.mm b/Source/IGListKit/Internal/IGListWorkingRangeHandler.mm index 523e020c..b6091c79 100644 --- a/Source/IGListKit/Internal/IGListWorkingRangeHandler.mm +++ b/Source/IGListKit/Internal/IGListWorkingRangeHandler.mm @@ -124,8 +124,6 @@ typedef std::unordered_set<_IGListWorkingRangeHandlerIndexPath, _IGListWorkingRa workingRangeSectionControllers.insert({sectionController}); } - IGAssert(workingRangeSectionControllers.size() < 1000, @"This algorithm is way too slow with so many objects:%lu", workingRangeSectionControllers.size()); - // Tell any new section controllers that they have entered the working range for (const _IGListWorkingRangeHandlerSectionControllerWrapper &wrapper : workingRangeSectionControllers) { // Check if the item exists in the old working range item array.