Skip to content

Commit 400c3e0

Browse files
zeyapmeta-codesync[bot]
authored andcommitted
Remove animatedShouldUseSingleOp feature flag (#57364)
Summary: Pull Request resolved: #57364 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 fbshipit-source-id: dbd3a4f58dd5c1edafcbf8a8e7a015a6eb72aea9
1 parent 859bdb8 commit 400c3e0

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
@@ -992,17 +992,6 @@ const definitions: FeatureFlagDefinitions = {
992992
},
993993
ossReleaseStage: 'none',
994994
},
995-
animatedShouldUseSingleOp: {
996-
defaultValue: true,
997-
metadata: {
998-
dateAdded: '2024-02-05',
999-
description:
1000-
'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.',
1001-
expectedReleaseValue: true,
1002-
purpose: 'experimentation',
1003-
},
1004-
ossReleaseStage: 'none',
1005-
},
1006995
deferFlatListFocusChangeRenderUpdate: {
1007996
defaultValue: false,
1008997
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<<c41d0e6beb021a015dfefa83b53f8ebe>>
7+
* @generated SignedSource<<f7cb7efa372c83876b06b1492f46003b>>
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>,
@@ -156,11 +155,6 @@ export const animatedForceNativeDriver: Getter<boolean> = createJavaScriptFlagGe
156155
*/
157156
export const animatedShouldSyncValueBeforeStartCallback: Getter<boolean> = createJavaScriptFlagGetter('animatedShouldSyncValueBeforeStartCallback', true);
158157

159-
/**
160-
* 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.
161-
*/
162-
export const animatedShouldUseSingleOp: Getter<boolean> = createJavaScriptFlagGetter('animatedShouldUseSingleOp', true);
163-
164158
/**
165159
* Use the deferred cell render update mechanism for focus change in FlatList.
166160
*/

0 commit comments

Comments
 (0)