Skip to content

Commit 9f4513c

Browse files
javachemeta-codesync[bot]
authored andcommitted
Cleanup useLISAlgorithmInDifferentiator flag (#56715)
Summary: Pull Request resolved: #56715 Remove the useLISAlgorithmInDifferentiator feature flag and all associated code. This flag was an experimentation flag for using the Longest Increasing Subsequence algorithm in the Differentiator to minimize REMOVE/INSERT mutations during child list reconciliation. The experiment is not being shipped (default was false), so all references are being cleaned up. Changes include: - Remove flag from ReactNativeFeatureFlags.config.js and all generated files (C++, Kotlin, JNI, JS) - Remove the LIS algorithm code path from Differentiator.cpp, keeping only the existing greedy algorithm - Delete LongestIncreasingSubsequence.h helper and its unit tests - Update ShadowTreeLifeCycleTest.cpp to remove LIS parameterization (now greedy-only) - Update Mounting-itest.js and View-benchmark-itest.js to remove LIS flag references and conditional branches - Remove Facebook Android/iOS overrides and mobile config entries - Update C++ API snapshots to remove longestIncreasingSubsequence symbol Changelog: [General][Removed] - Remove unused `useLISAlgorithmInDifferentiator` feature flag and LIS algorithm code from the Differentiator Reviewed By: sammy-SC Differential Revision: D104044772 fbshipit-source-id: 08857d23edba72ec2cf7bdeea876335087b9da8d
1 parent 4255f9b commit 9f4513c

32 files changed

Lines changed: 91 additions & 1017 deletions

packages/react-native/Libraries/Components/View/__tests__/View-benchmark-itest.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @fantom_flags useLISAlgorithmInDifferentiator:*
87
* @flow strict-local
98
* @format
109
*/

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<61221e9b185b4e9b9f0db0c99c7c9dc1>>
7+
* @generated SignedSource<<d4e81be344e15b275d015651b4fa824d>>
88
*/
99

1010
/**
@@ -510,12 +510,6 @@ public object ReactNativeFeatureFlags {
510510
@JvmStatic
511511
public fun useFabricInterop(): Boolean = accessor.useFabricInterop()
512512

513-
/**
514-
* Use Longest Increasing Subsequence algorithm in the Differentiator to minimize REMOVE/INSERT mutations during child list reconciliation.
515-
*/
516-
@JvmStatic
517-
public fun useLISAlgorithmInDifferentiator(): Boolean = accessor.useLISAlgorithmInDifferentiator()
518-
519513
/**
520514
* When enabled, the native view configs are used in bridgeless mode.
521515
*/

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<f23dc5d7320599de13f35700a09d783a>>
7+
* @generated SignedSource<<189cc2dd3b42cd736191f13b442e7317>>
88
*/
99

1010
/**
@@ -100,7 +100,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
100100
private var updateRuntimeShadowNodeReferencesOnCommitThreadCache: Boolean? = null
101101
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
102102
private var useFabricInteropCache: Boolean? = null
103-
private var useLISAlgorithmInDifferentiatorCache: Boolean? = null
104103
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
105104
private var useNestedScrollViewAndroidCache: Boolean? = null
106105
private var useOptimizedViewRegistryOnAndroidCache: Boolean? = null
@@ -834,15 +833,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
834833
return cached
835834
}
836835

837-
override fun useLISAlgorithmInDifferentiator(): Boolean {
838-
var cached = useLISAlgorithmInDifferentiatorCache
839-
if (cached == null) {
840-
cached = ReactNativeFeatureFlagsCxxInterop.useLISAlgorithmInDifferentiator()
841-
useLISAlgorithmInDifferentiatorCache = cached
842-
}
843-
return cached
844-
}
845-
846836
override fun useNativeViewConfigsInBridgelessMode(): Boolean {
847837
var cached = useNativeViewConfigsInBridgelessModeCache
848838
if (cached == null) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<c398ef6325753f5666737fb84309c09e>>
7+
* @generated SignedSource<<81c6672ae539af203fae7e0f9cf541a6>>
88
*/
99

1010
/**
@@ -188,8 +188,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
188188

189189
@DoNotStrip @JvmStatic public external fun useFabricInterop(): Boolean
190190

191-
@DoNotStrip @JvmStatic public external fun useLISAlgorithmInDifferentiator(): Boolean
192-
193191
@DoNotStrip @JvmStatic public external fun useNativeViewConfigsInBridgelessMode(): Boolean
194192

195193
@DoNotStrip @JvmStatic public external fun useNestedScrollViewAndroid(): Boolean

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<4ba79f6843185d86bc9ad487b99d86a4>>
7+
* @generated SignedSource<<053d67947ccd1a3556c8f6e1b6af5a14>>
88
*/
99

1010
/**
@@ -183,8 +183,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
183183

184184
override fun useFabricInterop(): Boolean = true
185185

186-
override fun useLISAlgorithmInDifferentiator(): Boolean = false
187-
188186
override fun useNativeViewConfigsInBridgelessMode(): Boolean = false
189187

190188
override fun useNestedScrollViewAndroid(): Boolean = false

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<60a15dc6eb548f56216f284421c1e4da>>
7+
* @generated SignedSource<<24972f077ba738a8191a2956be61b491>>
88
*/
99

1010
/**
@@ -104,7 +104,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
104104
private var updateRuntimeShadowNodeReferencesOnCommitThreadCache: Boolean? = null
105105
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
106106
private var useFabricInteropCache: Boolean? = null
107-
private var useLISAlgorithmInDifferentiatorCache: Boolean? = null
108107
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
109108
private var useNestedScrollViewAndroidCache: Boolean? = null
110109
private var useOptimizedViewRegistryOnAndroidCache: Boolean? = null
@@ -918,16 +917,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
918917
return cached
919918
}
920919

921-
override fun useLISAlgorithmInDifferentiator(): Boolean {
922-
var cached = useLISAlgorithmInDifferentiatorCache
923-
if (cached == null) {
924-
cached = currentProvider.useLISAlgorithmInDifferentiator()
925-
accessedFeatureFlags.add("useLISAlgorithmInDifferentiator")
926-
useLISAlgorithmInDifferentiatorCache = cached
927-
}
928-
return cached
929-
}
930-
931920
override fun useNativeViewConfigsInBridgelessMode(): Boolean {
932921
var cached = useNativeViewConfigsInBridgelessModeCache
933922
if (cached == null) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<b353ae56cf0cd23d93be23a675b30de1>>
7+
* @generated SignedSource<<a7c69ce7e10faeb5328412c5e29552cf>>
88
*/
99

1010
/**
@@ -183,8 +183,6 @@ public interface ReactNativeFeatureFlagsProvider {
183183

184184
@DoNotStrip public fun useFabricInterop(): Boolean
185185

186-
@DoNotStrip public fun useLISAlgorithmInDifferentiator(): Boolean
187-
188186
@DoNotStrip public fun useNativeViewConfigsInBridgelessMode(): Boolean
189187

190188
@DoNotStrip public fun useNestedScrollViewAndroid(): Boolean

packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<93d9279dba687d7f660a6797549c0819>>
7+
* @generated SignedSource<<74f0602ce337a86730efe638ab8e966d>>
88
*/
99

1010
/**
@@ -519,12 +519,6 @@ class ReactNativeFeatureFlagsJavaProvider
519519
return method(javaProvider_);
520520
}
521521

522-
bool useLISAlgorithmInDifferentiator() override {
523-
static const auto method =
524-
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useLISAlgorithmInDifferentiator");
525-
return method(javaProvider_);
526-
}
527-
528522
bool useNativeViewConfigsInBridgelessMode() override {
529523
static const auto method =
530524
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useNativeViewConfigsInBridgelessMode");
@@ -1001,11 +995,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useFabricInterop(
1001995
return ReactNativeFeatureFlags::useFabricInterop();
1002996
}
1003997

1004-
bool JReactNativeFeatureFlagsCxxInterop::useLISAlgorithmInDifferentiator(
1005-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
1006-
return ReactNativeFeatureFlags::useLISAlgorithmInDifferentiator();
1007-
}
1008-
1009998
bool JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode(
1010999
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
10111000
return ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode();
@@ -1337,9 +1326,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
13371326
makeNativeMethod(
13381327
"useFabricInterop",
13391328
JReactNativeFeatureFlagsCxxInterop::useFabricInterop),
1340-
makeNativeMethod(
1341-
"useLISAlgorithmInDifferentiator",
1342-
JReactNativeFeatureFlagsCxxInterop::useLISAlgorithmInDifferentiator),
13431329
makeNativeMethod(
13441330
"useNativeViewConfigsInBridgelessMode",
13451331
JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode),

packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<ef1a37cff6b7076193c47374eb6cca15>>
7+
* @generated SignedSource<<2e867941f693c14c0c52475d790cfed4>>
88
*/
99

1010
/**
@@ -270,9 +270,6 @@ class JReactNativeFeatureFlagsCxxInterop
270270
static bool useFabricInterop(
271271
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
272272

273-
static bool useLISAlgorithmInDifferentiator(
274-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
275-
276273
static bool useNativeViewConfigsInBridgelessMode(
277274
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
278275

packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<0a3c6a3353d22cf5909fd5a0f98a970e>>
7+
* @generated SignedSource<<9c49f2931ab219997bc29969de95805d>>
88
*/
99

1010
/**
@@ -346,10 +346,6 @@ bool ReactNativeFeatureFlags::useFabricInterop() {
346346
return getAccessor().useFabricInterop();
347347
}
348348

349-
bool ReactNativeFeatureFlags::useLISAlgorithmInDifferentiator() {
350-
return getAccessor().useLISAlgorithmInDifferentiator();
351-
}
352-
353349
bool ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode() {
354350
return getAccessor().useNativeViewConfigsInBridgelessMode();
355351
}

0 commit comments

Comments
 (0)