From 4048f995a338455dd1bc8dc36edd3adc3dabcdbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Thu, 30 May 2024 08:11:19 -0700 Subject: [PATCH] Revert batching for mount operations accumulated before root view attached Summary: Changelog: [internal] Batching operations at this layer was wrong because these are the operations that were already flushed by the mounting layer but were accumulated in `SurfaceMountingManager` because the root view wasn't created. These operations should be executed before anything else that's scheduled in the `MountItemDispatcher`, so we should never batch them. The problem this was trying to solve is solved in a different way in D57968937. This was gated so this shouldn't affect any current usages. Differential Revision: D57968939 --- .../java/com/facebook/react/fabric/FabricUIManager.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java index d2c4732b854a32..9579db07cd5751 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java @@ -214,14 +214,7 @@ public class FabricUIManager public void executeItems(Queue items) { // This executor can be technically accessed before the dispatcher is created, // but if that happens, something is terribly wrong - if (ReactNativeFeatureFlags.forceBatchingMountItemsOnAndroid()) { - for (MountItem mountItem : items) { - mMountItemDispatcher.addMountItem(mountItem); - } - mMountItemDispatcher.tryDispatchMountItems(); - } else { - mMountItemDispatcher.dispatchMountItems(items); - } + mMountItemDispatcher.dispatchMountItems(items); } };