Commit 590932f
Disable single-op batching under C++ native animated, otherwise enable by default
Summary:
Single-op batching (`queueAndExecuteBatchedOperations`) is incompatible with the C++ native animated backend. Move that guard out of per-product feature-flag overrides and into `NativeAnimatedHelper`: `isSingleOpBatching` is now gated on `Platform.OS === 'android'`, `queueAndExecuteBatchedOperations` being available, and `!cxxNativeAnimatedEnabled()`. With the invariant centralized, the redundant `animatedShouldUseSingleOp` overrides in the panel-app and igvr override files are removed (igvr keeps a passthrough override file wired into IGVRPrelude).
**Single-op batching is most meaningful only on Android**: it collapses many per-operation JNI crossings into a single call, a significant win on the legacy bridge path. On other platforms (and on the C++/JSI path) the calls do not cross JNI, so batching would help performance only marginally while hurting debuggability — the ops are packed into an opaque serialized buffer and callbacks are rerouted through the device event emitter. That trade-off is why it stays Android-only and off under C++ native animated.
Behavior note: with C++ native animated enabled (the default), this is a no-op — single-op was already forced off. Where C++ native animated is disabled on Android, single-op is now on by default (it was previously gated by the `animatedShouldUseSingleOp` flag, which defaulted to off).
Changelog:
[Internal]
Reviewed By: christophpurrer
Differential Revision: D1094687721 parent b2602e9 commit 590932f
3 files changed
Lines changed: 5 additions & 4 deletions
File tree
- packages/react-native
- scripts/featureflags
- src/private
- animated
- featureflags
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
993 | 993 | | |
994 | 994 | | |
995 | 995 | | |
996 | | - | |
| 996 | + | |
997 | 997 | | |
998 | 998 | | |
999 | 999 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
0 commit comments