diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.java index 5aa1c5788fd..2155755f451 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.java @@ -282,12 +282,17 @@ public class MountItemDispatcher { } PreAllocateViewMountItem preMountItemToDispatch = mPreMountItems.poll(); - // If list is empty, `poll` will return null, or var will never be set if (preMountItemToDispatch == null) { break; } + if (ENABLE_FABRIC_LOGS) { + printMountItem( + preMountItemToDispatch, + "dispatchPreMountItems: Dispatching PreAllocateViewMountItem"); + } + executeOrEnqueue(preMountItemToDispatch); } } finally { @@ -299,6 +304,12 @@ public class MountItemDispatcher { private void executeOrEnqueue(MountItem item) { if (mMountingManager.isWaitingForViewAttach(item.getSurfaceId())) { + if (ENABLE_FABRIC_LOGS) { + FLog.e( + TAG, + "executeOrEnqueue: Item execution delayed, surface %s is not ready yet", + item.getSurfaceId()); + } SurfaceMountingManager surfaceMountingManager = mMountingManager.getSurfaceManager(item.getSurfaceId()); surfaceMountingManager.executeOnViewAttach(item); diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/PreAllocateViewMountItem.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/PreAllocateViewMountItem.java index 7b540ae89a4..4516d60dd85 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/PreAllocateViewMountItem.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/PreAllocateViewMountItem.java @@ -7,7 +7,6 @@ package com.facebook.react.fabric.mounting.mountitems; -import static com.facebook.react.fabric.FabricUIManager.ENABLE_FABRIC_LOGS; import static com.facebook.react.fabric.FabricUIManager.IS_DEVELOPMENT_ENVIRONMENT; import static com.facebook.react.fabric.FabricUIManager.TAG; @@ -51,9 +50,6 @@ public class PreAllocateViewMountItem implements MountItem { @Override public void execute(@NonNull MountingManager mountingManager) { - if (ENABLE_FABRIC_LOGS) { - FLog.d(TAG, "Executing pre-allocation of: " + toString()); - } SurfaceMountingManager surfaceMountingManager = mountingManager.getSurfaceManager(mSurfaceId); if (surfaceMountingManager == null) { FLog.e(