Skip to content

Commit

Permalink
Revert batching for mount operations accumulated before root view att…
Browse files Browse the repository at this point in the history
…ached

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
  • Loading branch information
rubennorte authored and facebook-github-bot committed May 30, 2024
1 parent 32b5c96 commit 4048f99
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,7 @@ public class FabricUIManager
public void executeItems(Queue<MountItem> 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);
}
};

Expand Down

0 comments on commit 4048f99

Please sign in to comment.