From f45b540ddf29c7e9174ce9ab2f800e47ae2f623d Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Mon, 23 Oct 2023 07:40:31 -0700 Subject: [PATCH] remove feature flag enableEarlyScheduledMountItemExecution (#41146) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41146 changelog: [internal] Remove old feature flag Reviewed By: rshest Differential Revision: D50537414 fbshipit-source-id: 93aa254ac285b8e03edfec1bec1238a220b9fdcf --- .../facebook/react/config/ReactFeatureFlags.java | 3 --- .../com/facebook/react/fabric/FabricUIManager.java | 14 -------------- 2 files changed, 17 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java index 242cdf5661a516..1a2dafabaa5aa6 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java @@ -112,9 +112,6 @@ public class ReactFeatureFlags { */ public static boolean enableRemoveDeleteTreeInstruction = false; - /** Temporary flag to allow execution of mount items up to 15ms earlier than normal. */ - public static boolean enableEarlyScheduledMountItemExecution = false; - /** * Allow closing the small gap that appears between paths when drawing a rounded View with a * border. 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 fee085185e604c..acd5d4790c63f0 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 @@ -799,20 +799,6 @@ public void runGuarded() { }; if (UiThreadUtil.isOnUiThread()) { runnable.run(); - } else { - // The Choreographer will dispatch any mount items, - // but it only gets called at the /beginning/ of the - // frame - it has no idea if, or when, there is actually work scheduled. That means if we - // have a big chunk of work - // scheduled but the scheduling happens 1ms after the - // start of a UI frame, we'll miss out on 15ms of time - // to perform the work (assuming a 16ms frame). - // The DispatchUIFrameCallback still has value because of - // the PreMountItems that we need to process at a lower - // priority. - if (ReactFeatureFlags.enableEarlyScheduledMountItemExecution) { - UiThreadUtil.runOnUiThread(runnable); - } } }