From 9e59bdea115acdc7028e897863e551c0bf225f8b Mon Sep 17 00:00:00 2001 From: Zhisheng Huang Date: Wed, 6 Mar 2019 13:02:01 -0800 Subject: [PATCH] Remove the unnecessary assert which would affect IGListKit perf Summary: This assert was hoping to find if there are any duplicates from the `fromObjects`. However, from the finding, we did not see any assertion or trace that this is the case. The `objectsWithDuplicateIdentifiersRemoved` is actually doing extra work during updates. We should remove this for the sake of better scroll perf and faster UI update. Reviewed By: calimarkus Differential Revision: D14339124 fbshipit-source-id: ff40fd23a05640058673d46f63a9e4bf516dd3f6 --- Source/IGListAdapterUpdater.m | 2 -- 1 file changed, 2 deletions(-) diff --git a/Source/IGListAdapterUpdater.m b/Source/IGListAdapterUpdater.m index 859c5993..066aff4e 100644 --- a/Source/IGListAdapterUpdater.m +++ b/Source/IGListAdapterUpdater.m @@ -131,8 +131,6 @@ executeCompletionBlocks(NO); return; } - - IGAssert(objectsWithDuplicateIdentifiersRemoved(fromObjects).count == fromObjects.count, @"The fromObjects has duplicate identifiers (it should already be dedupepd at this point)."); NSArray *toObjects = nil; if (toObjectsBlock != nil) {