delete change_order_of_mounting_instructions optimisation (#46113)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46113

changelog: [internal]

This showed promised in local tracing but that failed to translate to real perf improvement. Unshipping.

Reviewed By: christophpurrer

Differential Revision: D61537744

fbshipit-source-id: 03a2a69a6fed32a6b493bc17372e3783b9db2d1e
This commit is contained in:
Samuel Susla
2024-08-21 06:04:57 -07:00
committed by Facebook GitHub Bot
parent 8f0f50f7a1
commit a462dfd6ce
20 changed files with 60 additions and 218 deletions
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<b352d8e6c8dd42936ee48024320f6b77>>
* @generated SignedSource<<213f28bbe5ea5f66048ece938609e815>>
*/
/**
@@ -46,12 +46,6 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun batchRenderingUpdatesInEventLoop(): Boolean = accessor.batchRenderingUpdatesInEventLoop()
/**
* When enabled, insert of views on Android will be moved from the beginning of the IntBufferBatchMountItem to be after layout updates.
*/
@JvmStatic
public fun changeOrderOfMountingInstructionsOnAndroid(): Boolean = accessor.changeOrderOfMountingInstructionsOnAndroid()
/**
* Do not wait for a main-thread dispatch to complete init to start executing work on the JS thread on Android
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<50f259bf80948b672a8677307456d413>>
* @generated SignedSource<<dbad540b061200d42d58f89dd48f2d7b>>
*/
/**
@@ -23,7 +23,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
private var commonTestFlagCache: Boolean? = null
private var allowRecursiveCommitsWithSynchronousMountOnAndroidCache: Boolean? = null
private var batchRenderingUpdatesInEventLoopCache: Boolean? = null
private var changeOrderOfMountingInstructionsOnAndroidCache: Boolean? = null
private var completeReactInstanceCreationOnBgThreadOnAndroidCache: Boolean? = null
private var destroyFabricSurfacesInReactInstanceManagerCache: Boolean? = null
private var enableAlignItemsBaselineOnFabricIOSCache: Boolean? = null
@@ -93,15 +92,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
return cached
}
override fun changeOrderOfMountingInstructionsOnAndroid(): Boolean {
var cached = changeOrderOfMountingInstructionsOnAndroidCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.changeOrderOfMountingInstructionsOnAndroid()
changeOrderOfMountingInstructionsOnAndroidCache = cached
}
return cached
}
override fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean {
var cached = completeReactInstanceCreationOnBgThreadOnAndroidCache
if (cached == null) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<3b5998555d0f27d3f83923cb516edb36>>
* @generated SignedSource<<3dccfc01207bf4ea6b671754cbd31313>>
*/
/**
@@ -34,8 +34,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
@DoNotStrip @JvmStatic public external fun batchRenderingUpdatesInEventLoop(): Boolean
@DoNotStrip @JvmStatic public external fun changeOrderOfMountingInstructionsOnAndroid(): Boolean
@DoNotStrip @JvmStatic public external fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean
@DoNotStrip @JvmStatic public external fun destroyFabricSurfacesInReactInstanceManager(): Boolean
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<86db65691c73cff2843e81e053268892>>
* @generated SignedSource<<b7de0bdf61f9b20363ade9ae0c07fbd4>>
*/
/**
@@ -29,8 +29,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
override fun batchRenderingUpdatesInEventLoop(): Boolean = false
override fun changeOrderOfMountingInstructionsOnAndroid(): Boolean = false
override fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean = false
override fun destroyFabricSurfacesInReactInstanceManager(): Boolean = false
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<b460c7106715c0ea405dd6b284802d27>>
* @generated SignedSource<<fd8d47346a04e8f0da915d2f9fe53253>>
*/
/**
@@ -27,7 +27,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
private var commonTestFlagCache: Boolean? = null
private var allowRecursiveCommitsWithSynchronousMountOnAndroidCache: Boolean? = null
private var batchRenderingUpdatesInEventLoopCache: Boolean? = null
private var changeOrderOfMountingInstructionsOnAndroidCache: Boolean? = null
private var completeReactInstanceCreationOnBgThreadOnAndroidCache: Boolean? = null
private var destroyFabricSurfacesInReactInstanceManagerCache: Boolean? = null
private var enableAlignItemsBaselineOnFabricIOSCache: Boolean? = null
@@ -100,16 +99,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
return cached
}
override fun changeOrderOfMountingInstructionsOnAndroid(): Boolean {
var cached = changeOrderOfMountingInstructionsOnAndroidCache
if (cached == null) {
cached = currentProvider.changeOrderOfMountingInstructionsOnAndroid()
accessedFeatureFlags.add("changeOrderOfMountingInstructionsOnAndroid")
changeOrderOfMountingInstructionsOnAndroidCache = cached
}
return cached
}
override fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean {
var cached = completeReactInstanceCreationOnBgThreadOnAndroidCache
if (cached == null) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<7260472dccd3ec3c9612727c6c337f24>>
* @generated SignedSource<<fa4d24b87da9262d4a55da3e8377d0c2>>
*/
/**
@@ -29,8 +29,6 @@ public interface ReactNativeFeatureFlagsProvider {
@DoNotStrip public fun batchRenderingUpdatesInEventLoop(): Boolean
@DoNotStrip public fun changeOrderOfMountingInstructionsOnAndroid(): Boolean
@DoNotStrip public fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean
@DoNotStrip public fun destroyFabricSurfacesInReactInstanceManager(): Boolean
@@ -504,13 +504,6 @@ void FabricMountingManager::executeMount(
const auto& mountItem = cppCommonMountItems[i];
const auto& mountItemType = mountItem.type;
if (ReactNativeFeatureFlags::changeOrderOfMountingInstructionsOnAndroid() &&
mountItemType != CppMountItem::Type::Create) {
prevMountItemType = -1;
// Skip all mount items except Create.
continue;
}
// Get type here, and count forward how many items of this type are in a
// row. Write preamble to any common type here.
if (prevMountItemType != mountItemType) {
@@ -739,55 +732,6 @@ void FabricMountingManager::executeMount(
}
}
if (ReactNativeFeatureFlags::changeOrderOfMountingInstructionsOnAndroid()) {
// Fill in all other instructions.
prevMountItemType = -1;
for (int i = 0; i < cppCommonMountItems.size(); i++) {
const auto& mountItem = cppCommonMountItems[i];
const auto& mountItemType = mountItem.type;
if (mountItemType == CppMountItem::Type::Create) {
prevMountItemType = -1;
continue;
}
// Get type here, and count forward how many items of this type are in
// row. Write preamble to any common type here.
if (prevMountItemType != mountItemType) {
int numSameItemTypes = 1;
for (int j = i + 1; j < cppCommonMountItems.size() &&
cppCommonMountItems[j].type == mountItemType;
j++) {
numSameItemTypes++;
}
writeIntBufferTypePreamble(
mountItemType,
numSameItemTypes,
env,
intBufferArray,
intBufferPosition);
}
prevMountItemType = mountItemType;
if (mountItemType == CppMountItem::Type::Insert) {
temp[0] = mountItem.newChildShadowView.tag;
temp[1] = mountItem.parentShadowView.tag;
temp[2] = mountItem.index;
env->SetIntArrayRegion(intBufferArray, intBufferPosition, 3, temp);
intBufferPosition += 3;
} else if (mountItemType == CppMountItem::Remove) {
temp[0] = mountItem.oldChildShadowView.tag;
temp[1] = mountItem.parentShadowView.tag;
temp[2] = mountItem.index;
env->SetIntArrayRegion(intBufferArray, intBufferPosition, 3, temp);
intBufferPosition += 3;
} else {
LOG(ERROR) << "Unexpected CppMountItem type: " << mountItemType;
}
}
}
// Write deletes last - so that all prop updates, etc, for the tag in the same
// batch don't fail. Without additional machinery, moving deletes here
// requires that the differ never produces "DELETE...CREATE" in that order for
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<5847fa577b3396b35e3bd363a5618978>>
* @generated SignedSource<<7c9c4fe7fb8c50deaacfca3e1236eb95>>
*/
/**
@@ -57,12 +57,6 @@ class ReactNativeFeatureFlagsProviderHolder
return method(javaProvider_);
}
bool changeOrderOfMountingInstructionsOnAndroid() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("changeOrderOfMountingInstructionsOnAndroid");
return method(javaProvider_);
}
bool completeReactInstanceCreationOnBgThreadOnAndroid() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("completeReactInstanceCreationOnBgThreadOnAndroid");
@@ -328,11 +322,6 @@ bool JReactNativeFeatureFlagsCxxInterop::batchRenderingUpdatesInEventLoop(
return ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop();
}
bool JReactNativeFeatureFlagsCxxInterop::changeOrderOfMountingInstructionsOnAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::changeOrderOfMountingInstructionsOnAndroid();
}
bool JReactNativeFeatureFlagsCxxInterop::completeReactInstanceCreationOnBgThreadOnAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::completeReactInstanceCreationOnBgThreadOnAndroid();
@@ -564,9 +553,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"batchRenderingUpdatesInEventLoop",
JReactNativeFeatureFlagsCxxInterop::batchRenderingUpdatesInEventLoop),
makeNativeMethod(
"changeOrderOfMountingInstructionsOnAndroid",
JReactNativeFeatureFlagsCxxInterop::changeOrderOfMountingInstructionsOnAndroid),
makeNativeMethod(
"completeReactInstanceCreationOnBgThreadOnAndroid",
JReactNativeFeatureFlagsCxxInterop::completeReactInstanceCreationOnBgThreadOnAndroid),
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<8862dfc0107d61550ec61078928350b6>>
* @generated SignedSource<<2f38de8d77e21643f0cb253dec06c979>>
*/
/**
@@ -39,9 +39,6 @@ class JReactNativeFeatureFlagsCxxInterop
static bool batchRenderingUpdatesInEventLoop(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool changeOrderOfMountingInstructionsOnAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool completeReactInstanceCreationOnBgThreadOnAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<0a5c752e7d7ae1edd9c495dce0557347>>
* @generated SignedSource<<bfc4f756d9a8a6839780614aeb155927>>
*/
/**
@@ -33,10 +33,6 @@ bool ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop() {
return getAccessor().batchRenderingUpdatesInEventLoop();
}
bool ReactNativeFeatureFlags::changeOrderOfMountingInstructionsOnAndroid() {
return getAccessor().changeOrderOfMountingInstructionsOnAndroid();
}
bool ReactNativeFeatureFlags::completeReactInstanceCreationOnBgThreadOnAndroid() {
return getAccessor().completeReactInstanceCreationOnBgThreadOnAndroid();
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<0f3eb0af6d8f2012fc5169d59d38cbc4>>
* @generated SignedSource<<07380f2e1127e32c6c585f6cdf377f36>>
*/
/**
@@ -52,11 +52,6 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool batchRenderingUpdatesInEventLoop();
/**
* When enabled, insert of views on Android will be moved from the beginning of the IntBufferBatchMountItem to be after layout updates.
*/
RN_EXPORT static bool changeOrderOfMountingInstructionsOnAndroid();
/**
* Do not wait for a main-thread dispatch to complete init to start executing work on the JS thread on Android
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<1bd4ec2cfe8f5b4b0e714ce6379d4875>>
* @generated SignedSource<<48fa80b30c7851231dec8cd2ac2e9edb>>
*/
/**
@@ -83,24 +83,6 @@ bool ReactNativeFeatureFlagsAccessor::batchRenderingUpdatesInEventLoop() {
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::changeOrderOfMountingInstructionsOnAndroid() {
auto flagValue = changeOrderOfMountingInstructionsOnAndroid_.load();
if (!flagValue.has_value()) {
// This block is not exclusive but it is not necessary.
// If multiple threads try to initialize the feature flag, we would only
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(3, "changeOrderOfMountingInstructionsOnAndroid");
flagValue = currentProvider_->changeOrderOfMountingInstructionsOnAndroid();
changeOrderOfMountingInstructionsOnAndroid_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::completeReactInstanceCreationOnBgThreadOnAndroid() {
auto flagValue = completeReactInstanceCreationOnBgThreadOnAndroid_.load();
@@ -110,7 +92,7 @@ bool ReactNativeFeatureFlagsAccessor::completeReactInstanceCreationOnBgThreadOnA
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(4, "completeReactInstanceCreationOnBgThreadOnAndroid");
markFlagAsAccessed(3, "completeReactInstanceCreationOnBgThreadOnAndroid");
flagValue = currentProvider_->completeReactInstanceCreationOnBgThreadOnAndroid();
completeReactInstanceCreationOnBgThreadOnAndroid_ = flagValue;
@@ -128,7 +110,7 @@ bool ReactNativeFeatureFlagsAccessor::destroyFabricSurfacesInReactInstanceManage
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(5, "destroyFabricSurfacesInReactInstanceManager");
markFlagAsAccessed(4, "destroyFabricSurfacesInReactInstanceManager");
flagValue = currentProvider_->destroyFabricSurfacesInReactInstanceManager();
destroyFabricSurfacesInReactInstanceManager_ = flagValue;
@@ -146,7 +128,7 @@ bool ReactNativeFeatureFlagsAccessor::enableAlignItemsBaselineOnFabricIOS() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(6, "enableAlignItemsBaselineOnFabricIOS");
markFlagAsAccessed(5, "enableAlignItemsBaselineOnFabricIOS");
flagValue = currentProvider_->enableAlignItemsBaselineOnFabricIOS();
enableAlignItemsBaselineOnFabricIOS_ = flagValue;
@@ -164,7 +146,7 @@ bool ReactNativeFeatureFlagsAccessor::enableAndroidMixBlendModeProp() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(7, "enableAndroidMixBlendModeProp");
markFlagAsAccessed(6, "enableAndroidMixBlendModeProp");
flagValue = currentProvider_->enableAndroidMixBlendModeProp();
enableAndroidMixBlendModeProp_ = flagValue;
@@ -182,7 +164,7 @@ bool ReactNativeFeatureFlagsAccessor::enableBackgroundStyleApplicator() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(8, "enableBackgroundStyleApplicator");
markFlagAsAccessed(7, "enableBackgroundStyleApplicator");
flagValue = currentProvider_->enableBackgroundStyleApplicator();
enableBackgroundStyleApplicator_ = flagValue;
@@ -200,7 +182,7 @@ bool ReactNativeFeatureFlagsAccessor::enableCleanTextInputYogaNode() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(9, "enableCleanTextInputYogaNode");
markFlagAsAccessed(8, "enableCleanTextInputYogaNode");
flagValue = currentProvider_->enableCleanTextInputYogaNode();
enableCleanTextInputYogaNode_ = flagValue;
@@ -218,7 +200,7 @@ bool ReactNativeFeatureFlagsAccessor::enableEagerRootViewAttachment() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(10, "enableEagerRootViewAttachment");
markFlagAsAccessed(9, "enableEagerRootViewAttachment");
flagValue = currentProvider_->enableEagerRootViewAttachment();
enableEagerRootViewAttachment_ = flagValue;
@@ -236,7 +218,7 @@ bool ReactNativeFeatureFlagsAccessor::enableEventEmitterRetentionDuringGesturesO
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(11, "enableEventEmitterRetentionDuringGesturesOnAndroid");
markFlagAsAccessed(10, "enableEventEmitterRetentionDuringGesturesOnAndroid");
flagValue = currentProvider_->enableEventEmitterRetentionDuringGesturesOnAndroid();
enableEventEmitterRetentionDuringGesturesOnAndroid_ = flagValue;
@@ -254,7 +236,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricLogs() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(12, "enableFabricLogs");
markFlagAsAccessed(11, "enableFabricLogs");
flagValue = currentProvider_->enableFabricLogs();
enableFabricLogs_ = flagValue;
@@ -272,7 +254,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricRendererExclusively() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(13, "enableFabricRendererExclusively");
markFlagAsAccessed(12, "enableFabricRendererExclusively");
flagValue = currentProvider_->enableFabricRendererExclusively();
enableFabricRendererExclusively_ = flagValue;
@@ -290,7 +272,7 @@ bool ReactNativeFeatureFlagsAccessor::enableGranularShadowTreeStateReconciliatio
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(14, "enableGranularShadowTreeStateReconciliation");
markFlagAsAccessed(13, "enableGranularShadowTreeStateReconciliation");
flagValue = currentProvider_->enableGranularShadowTreeStateReconciliation();
enableGranularShadowTreeStateReconciliation_ = flagValue;
@@ -308,7 +290,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLongTaskAPI() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(15, "enableLongTaskAPI");
markFlagAsAccessed(14, "enableLongTaskAPI");
flagValue = currentProvider_->enableLongTaskAPI();
enableLongTaskAPI_ = flagValue;
@@ -326,7 +308,7 @@ bool ReactNativeFeatureFlagsAccessor::enableMicrotasks() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(16, "enableMicrotasks");
markFlagAsAccessed(15, "enableMicrotasks");
flagValue = currentProvider_->enableMicrotasks();
enableMicrotasks_ = flagValue;
@@ -344,7 +326,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePropsUpdateReconciliationAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(17, "enablePropsUpdateReconciliationAndroid");
markFlagAsAccessed(16, "enablePropsUpdateReconciliationAndroid");
flagValue = currentProvider_->enablePropsUpdateReconciliationAndroid();
enablePropsUpdateReconciliationAndroid_ = flagValue;
@@ -362,7 +344,7 @@ bool ReactNativeFeatureFlagsAccessor::enableReportEventPaintTime() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(18, "enableReportEventPaintTime");
markFlagAsAccessed(17, "enableReportEventPaintTime");
flagValue = currentProvider_->enableReportEventPaintTime();
enableReportEventPaintTime_ = flagValue;
@@ -380,7 +362,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSynchronousStateUpdates() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(19, "enableSynchronousStateUpdates");
markFlagAsAccessed(18, "enableSynchronousStateUpdates");
flagValue = currentProvider_->enableSynchronousStateUpdates();
enableSynchronousStateUpdates_ = flagValue;
@@ -398,7 +380,7 @@ bool ReactNativeFeatureFlagsAccessor::enableUIConsistency() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(20, "enableUIConsistency");
markFlagAsAccessed(19, "enableUIConsistency");
flagValue = currentProvider_->enableUIConsistency();
enableUIConsistency_ = flagValue;
@@ -416,7 +398,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecycling() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(21, "enableViewRecycling");
markFlagAsAccessed(20, "enableViewRecycling");
flagValue = currentProvider_->enableViewRecycling();
enableViewRecycling_ = flagValue;
@@ -434,7 +416,7 @@ bool ReactNativeFeatureFlagsAccessor::excludeYogaFromRawProps() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(22, "excludeYogaFromRawProps");
markFlagAsAccessed(21, "excludeYogaFromRawProps");
flagValue = currentProvider_->excludeYogaFromRawProps();
excludeYogaFromRawProps_ = flagValue;
@@ -452,7 +434,7 @@ bool ReactNativeFeatureFlagsAccessor::fetchImagesInViewPreallocation() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(23, "fetchImagesInViewPreallocation");
markFlagAsAccessed(22, "fetchImagesInViewPreallocation");
flagValue = currentProvider_->fetchImagesInViewPreallocation();
fetchImagesInViewPreallocation_ = flagValue;
@@ -470,7 +452,7 @@ bool ReactNativeFeatureFlagsAccessor::fixIncorrectScrollViewStateUpdateOnAndroid
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(24, "fixIncorrectScrollViewStateUpdateOnAndroid");
markFlagAsAccessed(23, "fixIncorrectScrollViewStateUpdateOnAndroid");
flagValue = currentProvider_->fixIncorrectScrollViewStateUpdateOnAndroid();
fixIncorrectScrollViewStateUpdateOnAndroid_ = flagValue;
@@ -488,7 +470,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMappingOfEventPrioritiesBetweenFabricAn
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(25, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
markFlagAsAccessed(24, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact();
fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue;
@@ -506,7 +488,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMissedFabricStateUpdatesOnAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(26, "fixMissedFabricStateUpdatesOnAndroid");
markFlagAsAccessed(25, "fixMissedFabricStateUpdatesOnAndroid");
flagValue = currentProvider_->fixMissedFabricStateUpdatesOnAndroid();
fixMissedFabricStateUpdatesOnAndroid_ = flagValue;
@@ -524,7 +506,7 @@ bool ReactNativeFeatureFlagsAccessor::forceBatchingMountItemsOnAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(27, "forceBatchingMountItemsOnAndroid");
markFlagAsAccessed(26, "forceBatchingMountItemsOnAndroid");
flagValue = currentProvider_->forceBatchingMountItemsOnAndroid();
forceBatchingMountItemsOnAndroid_ = flagValue;
@@ -542,7 +524,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxEnabledDebug() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(28, "fuseboxEnabledDebug");
markFlagAsAccessed(27, "fuseboxEnabledDebug");
flagValue = currentProvider_->fuseboxEnabledDebug();
fuseboxEnabledDebug_ = flagValue;
@@ -560,7 +542,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxEnabledRelease() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(29, "fuseboxEnabledRelease");
markFlagAsAccessed(28, "fuseboxEnabledRelease");
flagValue = currentProvider_->fuseboxEnabledRelease();
fuseboxEnabledRelease_ = flagValue;
@@ -578,7 +560,7 @@ bool ReactNativeFeatureFlagsAccessor::initEagerTurboModulesOnNativeModulesQueueA
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(30, "initEagerTurboModulesOnNativeModulesQueueAndroid");
markFlagAsAccessed(29, "initEagerTurboModulesOnNativeModulesQueueAndroid");
flagValue = currentProvider_->initEagerTurboModulesOnNativeModulesQueueAndroid();
initEagerTurboModulesOnNativeModulesQueueAndroid_ = flagValue;
@@ -596,7 +578,7 @@ bool ReactNativeFeatureFlagsAccessor::lazyAnimationCallbacks() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(31, "lazyAnimationCallbacks");
markFlagAsAccessed(30, "lazyAnimationCallbacks");
flagValue = currentProvider_->lazyAnimationCallbacks();
lazyAnimationCallbacks_ = flagValue;
@@ -614,7 +596,7 @@ bool ReactNativeFeatureFlagsAccessor::loadVectorDrawablesOnImages() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(32, "loadVectorDrawablesOnImages");
markFlagAsAccessed(31, "loadVectorDrawablesOnImages");
flagValue = currentProvider_->loadVectorDrawablesOnImages();
loadVectorDrawablesOnImages_ = flagValue;
@@ -632,7 +614,7 @@ bool ReactNativeFeatureFlagsAccessor::setAndroidLayoutDirection() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(33, "setAndroidLayoutDirection");
markFlagAsAccessed(32, "setAndroidLayoutDirection");
flagValue = currentProvider_->setAndroidLayoutDirection();
setAndroidLayoutDirection_ = flagValue;
@@ -650,7 +632,7 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(34, "traceTurboModulePromiseRejectionsOnAndroid");
markFlagAsAccessed(33, "traceTurboModulePromiseRejectionsOnAndroid");
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
@@ -668,7 +650,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(35, "useFabricInterop");
markFlagAsAccessed(34, "useFabricInterop");
flagValue = currentProvider_->useFabricInterop();
useFabricInterop_ = flagValue;
@@ -686,7 +668,7 @@ bool ReactNativeFeatureFlagsAccessor::useImmediateExecutorInAndroidBridgeless()
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(36, "useImmediateExecutorInAndroidBridgeless");
markFlagAsAccessed(35, "useImmediateExecutorInAndroidBridgeless");
flagValue = currentProvider_->useImmediateExecutorInAndroidBridgeless();
useImmediateExecutorInAndroidBridgeless_ = flagValue;
@@ -704,7 +686,7 @@ bool ReactNativeFeatureFlagsAccessor::useModernRuntimeScheduler() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(37, "useModernRuntimeScheduler");
markFlagAsAccessed(36, "useModernRuntimeScheduler");
flagValue = currentProvider_->useModernRuntimeScheduler();
useModernRuntimeScheduler_ = flagValue;
@@ -722,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(38, "useNativeViewConfigsInBridgelessMode");
markFlagAsAccessed(37, "useNativeViewConfigsInBridgelessMode");
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
useNativeViewConfigsInBridgelessMode_ = flagValue;
@@ -740,7 +722,7 @@ bool ReactNativeFeatureFlagsAccessor::useNewReactImageViewBackgroundDrawing() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(39, "useNewReactImageViewBackgroundDrawing");
markFlagAsAccessed(38, "useNewReactImageViewBackgroundDrawing");
flagValue = currentProvider_->useNewReactImageViewBackgroundDrawing();
useNewReactImageViewBackgroundDrawing_ = flagValue;
@@ -758,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimisedViewPreallocationOnAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(40, "useOptimisedViewPreallocationOnAndroid");
markFlagAsAccessed(39, "useOptimisedViewPreallocationOnAndroid");
flagValue = currentProvider_->useOptimisedViewPreallocationOnAndroid();
useOptimisedViewPreallocationOnAndroid_ = flagValue;
@@ -776,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::useRuntimeShadowNodeReferenceUpdate() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(41, "useRuntimeShadowNodeReferenceUpdate");
markFlagAsAccessed(40, "useRuntimeShadowNodeReferenceUpdate");
flagValue = currentProvider_->useRuntimeShadowNodeReferenceUpdate();
useRuntimeShadowNodeReferenceUpdate_ = flagValue;
@@ -794,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::useRuntimeShadowNodeReferenceUpdateOnLayou
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(42, "useRuntimeShadowNodeReferenceUpdateOnLayout");
markFlagAsAccessed(41, "useRuntimeShadowNodeReferenceUpdateOnLayout");
flagValue = currentProvider_->useRuntimeShadowNodeReferenceUpdateOnLayout();
useRuntimeShadowNodeReferenceUpdateOnLayout_ = flagValue;
@@ -812,7 +794,7 @@ bool ReactNativeFeatureFlagsAccessor::useStateAlignmentMechanism() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(43, "useStateAlignmentMechanism");
markFlagAsAccessed(42, "useStateAlignmentMechanism");
flagValue = currentProvider_->useStateAlignmentMechanism();
useStateAlignmentMechanism_ = flagValue;
@@ -830,7 +812,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(44, "useTurboModuleInterop");
markFlagAsAccessed(43, "useTurboModuleInterop");
flagValue = currentProvider_->useTurboModuleInterop();
useTurboModuleInterop_ = flagValue;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<bd279ee43c537a9de0a38a2801dd76e0>>
* @generated SignedSource<<6432ff6056c15e06c9791e629be8aa74>>
*/
/**
@@ -34,7 +34,6 @@ class ReactNativeFeatureFlagsAccessor {
bool commonTestFlag();
bool allowRecursiveCommitsWithSynchronousMountOnAndroid();
bool batchRenderingUpdatesInEventLoop();
bool changeOrderOfMountingInstructionsOnAndroid();
bool completeReactInstanceCreationOnBgThreadOnAndroid();
bool destroyFabricSurfacesInReactInstanceManager();
bool enableAlignItemsBaselineOnFabricIOS();
@@ -86,12 +85,11 @@ class ReactNativeFeatureFlagsAccessor {
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
bool wasOverridden_;
std::array<std::atomic<const char*>, 45> accessedFeatureFlags_;
std::array<std::atomic<const char*>, 44> accessedFeatureFlags_;
std::atomic<std::optional<bool>> commonTestFlag_;
std::atomic<std::optional<bool>> allowRecursiveCommitsWithSynchronousMountOnAndroid_;
std::atomic<std::optional<bool>> batchRenderingUpdatesInEventLoop_;
std::atomic<std::optional<bool>> changeOrderOfMountingInstructionsOnAndroid_;
std::atomic<std::optional<bool>> completeReactInstanceCreationOnBgThreadOnAndroid_;
std::atomic<std::optional<bool>> destroyFabricSurfacesInReactInstanceManager_;
std::atomic<std::optional<bool>> enableAlignItemsBaselineOnFabricIOS_;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<ff305f47f055a259d4ee673c5963f0fc>>
* @generated SignedSource<<88919d5889d0c1a03e0dcdbdcf7adddf>>
*/
/**
@@ -39,10 +39,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
return false;
}
bool changeOrderOfMountingInstructionsOnAndroid() override {
return false;
}
bool completeReactInstanceCreationOnBgThreadOnAndroid() override {
return false;
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<e93a8cbdef3c58542f5e5e5ccd746cb4>>
* @generated SignedSource<<4324b1bb52eeb7d73b455abd3758bd0b>>
*/
/**
@@ -28,7 +28,6 @@ class ReactNativeFeatureFlagsProvider {
virtual bool commonTestFlag() = 0;
virtual bool allowRecursiveCommitsWithSynchronousMountOnAndroid() = 0;
virtual bool batchRenderingUpdatesInEventLoop() = 0;
virtual bool changeOrderOfMountingInstructionsOnAndroid() = 0;
virtual bool completeReactInstanceCreationOnBgThreadOnAndroid() = 0;
virtual bool destroyFabricSurfacesInReactInstanceManager() = 0;
virtual bool enableAlignItemsBaselineOnFabricIOS() = 0;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<64011b082abd3a72e5da2b933d5b4691>>
* @generated SignedSource<<82f5464427c8411040c595775767a14c>>
*/
/**
@@ -52,11 +52,6 @@ bool NativeReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop(
return ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop();
}
bool NativeReactNativeFeatureFlags::changeOrderOfMountingInstructionsOnAndroid(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::changeOrderOfMountingInstructionsOnAndroid();
}
bool NativeReactNativeFeatureFlags::completeReactInstanceCreationOnBgThreadOnAndroid(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::completeReactInstanceCreationOnBgThreadOnAndroid();
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<23af9284953b14cb18ff1ad71145c29b>>
* @generated SignedSource<<b458f14c06be2bc012cdff17a8203d78>>
*/
/**
@@ -41,8 +41,6 @@ class NativeReactNativeFeatureFlags
bool batchRenderingUpdatesInEventLoop(jsi::Runtime& runtime);
bool changeOrderOfMountingInstructionsOnAndroid(jsi::Runtime& runtime);
bool completeReactInstanceCreationOnBgThreadOnAndroid(jsi::Runtime& runtime);
bool destroyFabricSurfacesInReactInstanceManager(jsi::Runtime& runtime);
@@ -49,11 +49,6 @@ const definitions: FeatureFlagDefinitions = {
description:
'When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop.',
},
changeOrderOfMountingInstructionsOnAndroid: {
defaultValue: false,
description:
'When enabled, insert of views on Android will be moved from the beginning of the IntBufferBatchMountItem to be after layout updates.',
},
completeReactInstanceCreationOnBgThreadOnAndroid: {
defaultValue: false,
description:
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<fb7a3dcf7b3e5001e45f808fb4410376>>
* @generated SignedSource<<ff51057b07601cf49603e2f28ef501b7>>
* @flow strict-local
*/
@@ -48,7 +48,6 @@ export type ReactNativeFeatureFlags = {
commonTestFlag: Getter<boolean>,
allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean>,
batchRenderingUpdatesInEventLoop: Getter<boolean>,
changeOrderOfMountingInstructionsOnAndroid: Getter<boolean>,
completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean>,
destroyFabricSurfacesInReactInstanceManager: Getter<boolean>,
enableAlignItemsBaselineOnFabricIOS: Getter<boolean>,
@@ -169,10 +168,6 @@ export const allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean>
* When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop.
*/
export const batchRenderingUpdatesInEventLoop: Getter<boolean> = createNativeFlagGetter('batchRenderingUpdatesInEventLoop', false);
/**
* When enabled, insert of views on Android will be moved from the beginning of the IntBufferBatchMountItem to be after layout updates.
*/
export const changeOrderOfMountingInstructionsOnAndroid: Getter<boolean> = createNativeFlagGetter('changeOrderOfMountingInstructionsOnAndroid', false);
/**
* Do not wait for a main-thread dispatch to complete init to start executing work on the JS thread on Android
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<9728234e0662758c72ba79b3cffbd4e5>>
* @generated SignedSource<<0795b225c6596461df69e979356a580d>>
* @flow strict-local
*/
@@ -26,7 +26,6 @@ export interface Spec extends TurboModule {
+commonTestFlag?: () => boolean;
+allowRecursiveCommitsWithSynchronousMountOnAndroid?: () => boolean;
+batchRenderingUpdatesInEventLoop?: () => boolean;
+changeOrderOfMountingInstructionsOnAndroid?: () => boolean;
+completeReactInstanceCreationOnBgThreadOnAndroid?: () => boolean;
+destroyFabricSurfacesInReactInstanceManager?: () => boolean;
+enableAlignItemsBaselineOnFabricIOS?: () => boolean;