Skip to content

Commit 59cd54d

Browse files
zeyapfacebook-github-bot
authored andcommitted
Remove animatedShouldUseSingleOp feature flag (#57364)
Summary: The single-op batching guard now lives entirely in `NativeAnimatedHelper`, where `isSingleOpBatching` is gated on `Platform.OS === 'android'`, `queueAndExecuteBatchedOperations` being available, and `!cxxNativeAnimatedEnabled()`. The `animatedShouldUseSingleOp` flag defaulted to `true` and no longer carries any of that logic, so it is fully redundant. Remove the flag from the config, drop its now-vestigial term from `isSingleOpBatching` in both `NativeAnimatedHelper.js` and the macOS variant, and regenerate `ReactNativeFeatureFlags.js`. This is behavior-preserving: with the flag at its default `true`, `isSingleOpBatching` evaluates identically to before on every platform. Changelog: [Internal] Reviewed By: javache Differential Revision: D109570192
1 parent b364490 commit 59cd54d

3 files changed

Lines changed: 1 addition & 19 deletions

File tree

packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -981,17 +981,6 @@ const definitions: FeatureFlagDefinitions = {
981981
},
982982
ossReleaseStage: 'none',
983983
},
984-
animatedShouldUseSingleOp: {
985-
defaultValue: true,
986-
metadata: {
987-
dateAdded: '2024-02-05',
988-
description:
989-
'Enables an experimental mega-operation for Animated.js that replaces many calls to native with a single call into native, to reduce JSI/JNI traffic.',
990-
expectedReleaseValue: true,
991-
purpose: 'experimentation',
992-
},
993-
ossReleaseStage: 'none',
994-
},
995984
deferFlatListFocusChangeRenderUpdate: {
996985
defaultValue: false,
997986
metadata: {

packages/react-native/src/private/animated/NativeAnimatedHelper.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ const singleOpQueue: Array<unknown> = [];
5656
const isSingleOpBatching =
5757
Platform.OS === 'android' &&
5858
NativeAnimatedModule?.queueAndExecuteBatchedOperations != null &&
59-
ReactNativeFeatureFlags.animatedShouldUseSingleOp() &&
6059
!ReactNativeFeatureFlags.cxxNativeAnimatedEnabled();
6160
let flushQueueImmediate = null;
6261

packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<5e80ae1ef75d1fbf51fd94cd5495157f>>
7+
* @generated SignedSource<<7b617acfec15f418c1d9fca60fdb3dd5>>
88
* @flow strict
99
* @noformat
1010
*/
@@ -32,7 +32,6 @@ export type ReactNativeFeatureFlagsJsOnly = Readonly<{
3232
animatedDeferStartOfTimingAnimations: Getter<boolean>,
3333
animatedForceNativeDriver: Getter<boolean>,
3434
animatedShouldSyncValueBeforeStartCallback: Getter<boolean>,
35-
animatedShouldUseSingleOp: Getter<boolean>,
3635
deferFlatListFocusChangeRenderUpdate: Getter<boolean>,
3736
enableImperativeEvents: Getter<boolean>,
3837
enableNativeEventTargetEventDispatching: Getter<boolean>,
@@ -155,11 +154,6 @@ export const animatedForceNativeDriver: Getter<boolean> = createJavaScriptFlagGe
155154
*/
156155
export const animatedShouldSyncValueBeforeStartCallback: Getter<boolean> = createJavaScriptFlagGetter('animatedShouldSyncValueBeforeStartCallback', true);
157156

158-
/**
159-
* Enables an experimental mega-operation for Animated.js that replaces many calls to native with a single call into native, to reduce JSI/JNI traffic.
160-
*/
161-
export const animatedShouldUseSingleOp: Getter<boolean> = createJavaScriptFlagGetter('animatedShouldUseSingleOp', true);
162-
163157
/**
164158
* Use the deferred cell render update mechanism for focus change in FlatList.
165159
*/

0 commit comments

Comments
 (0)