mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-23 09:18:29 +00:00
Roll out deffered [CATransaction commit] fix
Summary: **Context** Recently an IGListKit experiment was introduced, `IGListExperimentPerformUpdatesWithoutDeferringCATransactionCommit`. When enabled, we opt to no longer defer a call to `[CATransaction commit]`, because it could feasibly end a different transaction than intended. In practice, this was leading to issues with `UIViewPropertyAnimator`, where deffered commits were ending in-progress animators. **This Change** The results we have seen from enabling this fix show no changes to performance and stability, so this seems safe to roll out. This change removes the experiment, and enables the new, non-deffered behavior. Reviewed By: lorixx Differential Revision: D20120169 fbshipit-source-id: 0473652020a250d67b02b860fb74c73e43615aef
This commit is contained in:
parent
884b97d3af
commit
403b7e7ba9
2 changed files with 4 additions and 17 deletions
|
|
@ -31,9 +31,7 @@ typedef NS_OPTIONS (NSInteger, IGListExperiment) {
|
|||
/// Test invalidating layout when cell reloads/updates in IGListBindingSectionController.
|
||||
IGListExperimentInvalidateLayoutForUpdates = 1 << 8,
|
||||
/// Test using the collection view when asking for layout instead of accessing the data source. Only apply to IGListCollectionViewLayout.
|
||||
IGListExperimentUseCollectionViewInsteadOfDataSourceInLayout = 1 << 9,
|
||||
/// Test committing CATransactions inline instead of batching potentially unrelated animations
|
||||
IGListExperimentPerformUpdatesWithoutDeferringCATransactionCommit = 1 << 10
|
||||
IGListExperimentUseCollectionViewInsteadOfDataSourceInLayout = 1 << 9
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -260,22 +260,11 @@ willPerformBatchUpdatesWithCollectionView:collectionView
|
|||
batchUpdatesBlock(result);
|
||||
} completion:batchUpdatesCompletionBlock];
|
||||
} else {
|
||||
if (IGListExperimentEnabled(experiments, IGListExperimentPerformUpdatesWithoutDeferringCATransactionCommit)) {
|
||||
[UIView performWithoutAnimation:^{
|
||||
[collectionView performBatchUpdates:^{
|
||||
batchUpdatesBlock(result);
|
||||
} completion:batchUpdatesCompletionBlock];
|
||||
}];
|
||||
} else {
|
||||
[CATransaction begin];
|
||||
[CATransaction setDisableActions:YES];
|
||||
[UIView performWithoutAnimation:^{
|
||||
[collectionView performBatchUpdates:^{
|
||||
batchUpdatesBlock(result);
|
||||
} completion:^(BOOL finished) {
|
||||
[CATransaction commit];
|
||||
batchUpdatesCompletionBlock(finished);
|
||||
}];
|
||||
}
|
||||
} completion:batchUpdatesCompletionBlock];
|
||||
}];
|
||||
}
|
||||
} @catch (NSException *exception) {
|
||||
[delegate listAdapterUpdater:self
|
||||
|
|
|
|||
Loading…
Reference in a new issue