mirror of
https://github.com/TextureGroup/Texture.git
synced 2026-04-07 19:17:39 +00:00
Add experiment to skip waiting until all updates of collection/table view are committed in -accessibilityElements
The wait was introduced in #1217 which blocks the main thread until updates are proccessed. We suspect this causes perf regressions accross the app and need to confirm this via an experiment.
This commit is contained in:
@@ -19,10 +19,12 @@
|
||||
"exp_unfair_lock",
|
||||
"exp_infer_layer_defaults",
|
||||
"exp_network_image_queue",
|
||||
"exp_dealloc_queue_v2",
|
||||
"exp_collection_teardown",
|
||||
"exp_framesetter_cache",
|
||||
"exp_skip_clear_data"
|
||||
"exp_skip_clear_data",
|
||||
"exp_did_enter_preload_skip_asm_layout",
|
||||
"exp_disable_a11y_cache",
|
||||
"exp_skip_a11y_wait"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2455,7 +2455,9 @@ static NSString * const kReuseIdentifier = @"_ASCollectionReuseIdentifier";
|
||||
|
||||
- (NSArray *)accessibilityElements
|
||||
{
|
||||
[self waitUntilAllUpdatesAreCommitted];
|
||||
if (!ASActivateExperimentalFeature(ASExperimentalSkipAccessibilityWait)) {
|
||||
[self waitUntilAllUpdatesAreCommitted];
|
||||
}
|
||||
return [super accessibilityElements];
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ typedef NS_OPTIONS(NSUInteger, ASExperimentalFeatures) {
|
||||
ASExperimentalSkipClearData = 1 << 8, // exp_skip_clear_data
|
||||
ASExperimentalDidEnterPreloadSkipASMLayout = 1 << 9, // exp_did_enter_preload_skip_asm_layout
|
||||
ASExperimentalDisableAccessibilityCache = 1 << 10, // exp_disable_a11y_cache
|
||||
ASExperimentalSkipAccessibilityWait = 1 << 11, // exp_skip_a11y_wait
|
||||
ASExperimentalFeatureAll = 0xFFFFFFFF
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,8 @@ NSArray<NSString *> *ASExperimentalFeaturesGetNames(ASExperimentalFeatures flags
|
||||
@"exp_framesetter_cache",
|
||||
@"exp_skip_clear_data",
|
||||
@"exp_did_enter_preload_skip_asm_layout",
|
||||
@"exp_disable_a11y_cache"]));
|
||||
@"exp_disable_a11y_cache",
|
||||
@"exp_skip_a11y_wait"]));
|
||||
|
||||
if (flags == ASExperimentalFeatureAll) {
|
||||
return allNames;
|
||||
|
||||
@@ -2004,7 +2004,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
|
||||
|
||||
- (NSArray *)accessibilityElements
|
||||
{
|
||||
[self waitUntilAllUpdatesAreCommitted];
|
||||
if (!ASActivateExperimentalFeature(ASExperimentalSkipAccessibilityWait)) {
|
||||
[self waitUntilAllUpdatesAreCommitted];
|
||||
}
|
||||
return [super accessibilityElements];
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@ static ASExperimentalFeatures features[] = {
|
||||
ASExperimentalFramesetterCache,
|
||||
ASExperimentalSkipClearData,
|
||||
ASExperimentalDidEnterPreloadSkipASMLayout,
|
||||
ASExperimentalDisableAccessibilityCache
|
||||
ASExperimentalDisableAccessibilityCache,
|
||||
ASExperimentalSkipAccessibilityWait,
|
||||
};
|
||||
|
||||
@interface ASConfigurationTests : ASTestCase <ASConfigurationDelegate>
|
||||
@@ -51,7 +52,8 @@ static ASExperimentalFeatures features[] = {
|
||||
@"exp_framesetter_cache",
|
||||
@"exp_skip_clear_data",
|
||||
@"exp_did_enter_preload_skip_asm_layout",
|
||||
@"exp_disable_a11y_cache"
|
||||
@"exp_disable_a11y_cache",
|
||||
@"exp_skip_a11y_wait"
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user