From 4f9c61a37f088eed5b037ffbb79a47fe58c96989 Mon Sep 17 00:00:00 2001 From: Maxime Ollivier Date: Tue, 30 Apr 2019 10:44:00 -0700 Subject: [PATCH] clean up IGListExperimentBackgroundDiffingSerial Summary: * Cleaning up experiment Reviewed By: lorixx Differential Revision: D15134137 fbshipit-source-id: a3f5a6d7b4a5f3897608c4e32ad4c4e6e4e720e5 --- Source/Common/IGListExperiments.h | 2 -- Source/IGListAdapterUpdater.m | 11 +---------- Source/Internal/IGListAdapterUpdaterInternal.h | 2 -- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/Source/Common/IGListExperiments.h b/Source/Common/IGListExperiments.h index 0f243327..30048f33 100644 --- a/Source/Common/IGListExperiments.h +++ b/Source/Common/IGListExperiments.h @@ -26,8 +26,6 @@ typedef NS_OPTIONS (NSInteger, IGListExperiment) { IGListExperimentGetCollectionViewAtUpdate = 1 << 7, /// Test skipping layout when UICollectionView isn't visible IGListExperimentSkipLayout = 1 << 8, - /// Test updater diffing performed on a serial background queue. - IGListExperimentBackgroundDiffingSerial = 1 << 9, }; /** diff --git a/Source/IGListAdapterUpdater.m b/Source/IGListAdapterUpdater.m index 21a8b3f8..71eb84e0 100644 --- a/Source/IGListAdapterUpdater.m +++ b/Source/IGListAdapterUpdater.m @@ -265,17 +265,8 @@ willPerformBatchUpdatesWithCollectionView:collectionView } }; - dispatch_queue_t asyncQueue = nil; if (IGListExperimentEnabled(experiments, IGListExperimentBackgroundDiffing)) { - asyncQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - } else if (IGListExperimentEnabled(experiments, IGListExperimentBackgroundDiffingSerial)) { - if (_backgroundUpdateQueue == nil) { - _backgroundUpdateQueue = dispatch_queue_create("io.github.instagram.IGListKit.backgroundupdatequeue", DISPATCH_QUEUE_SERIAL); - } - asyncQueue = _backgroundUpdateQueue; - } - if (asyncQueue) { - dispatch_async(asyncQueue, ^{ + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ IGListIndexSetResult *result = performDiff(); dispatch_async(dispatch_get_main_queue(), ^{ performUpdate(result); diff --git a/Source/Internal/IGListAdapterUpdaterInternal.h b/Source/Internal/IGListAdapterUpdaterInternal.h index 40c8ef52..b794608b 100644 --- a/Source/Internal/IGListAdapterUpdaterInternal.h +++ b/Source/Internal/IGListAdapterUpdaterInternal.h @@ -41,8 +41,6 @@ FOUNDATION_EXTERN void convertReloadToDeleteInsert(NSMutableIndexSet *reloads, @property (nonatomic, assign) IGListBatchUpdateState state; @property (nonatomic, strong, nullable) IGListBatchUpdateData *applyingUpdateData; -@property (nonatomic, strong) dispatch_queue_t backgroundUpdateQueue; - - (void)performReloadDataWithCollectionViewBlock:(IGListCollectionViewBlock)collectionViewBlock; - (void)performBatchUpdatesWithCollectionViewBlock:(IGListCollectionViewBlock)collectionViewBlock; - (void)cleanStateBeforeUpdates;