Skip to content

Commit 58012fb

Browse files
sammy-SCmeta-codesync[bot]
authored andcommitted
Ship useUnorderedMapInDifferentiator (#56918)
Summary: Pull Request resolved: #56918 changelog: [internal] the experiment was neutral, let's ship it to simplify code Reviewed By: javache Differential Revision: D105943424 fbshipit-source-id: 3ff2ed1dbcb85f640305c4fcb2485db0a8a312fc
1 parent 6aa7e35 commit 58012fb

33 files changed

Lines changed: 51 additions & 660 deletions

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<<8b35aa70eea734a8bfcbb7bd651ba8e2>>
7+
* @generated SignedSource<<fb433838ff712ffa7b045065a35723f2>>
88
*/
99

1010
/**
@@ -540,12 +540,6 @@ public object ReactNativeFeatureFlags {
540540
@JvmStatic
541541
public fun useTurboModuleInterop(): Boolean = accessor.useTurboModuleInterop()
542542

543-
/**
544-
* Use std::unordered_map instead of TinyMap in the Differentiator for improved lookup performance.
545-
*/
546-
@JvmStatic
547-
public fun useUnorderedMapInDifferentiator(): Boolean = accessor.useUnorderedMapInDifferentiator()
548-
549543
/**
550544
* Outset the culling context frame with the provided ratio. The culling context frame size will be outset by width * ratio on the left and right, and height * ratio on the top and bottom.
551545
*/

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<<494ed85c58f80b4feb6fb9b83fe7a27e>>
7+
* @generated SignedSource<<1ac9ff65ae410a6b1afa6c92c2e9a86b>>
88
*/
99

1010
/**
@@ -105,7 +105,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
105105
private var useSharedAnimatedBackendCache: Boolean? = null
106106
private var useTraitHiddenOnAndroidCache: Boolean? = null
107107
private var useTurboModuleInteropCache: Boolean? = null
108-
private var useUnorderedMapInDifferentiatorCache: Boolean? = null
109108
private var viewCullingOutsetRatioCache: Double? = null
110109
private var viewTransitionEnabledCache: Boolean? = null
111110
private var viewTransitionUseHardwareBitmapAndroidCache: Boolean? = null
@@ -876,15 +875,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
876875
return cached
877876
}
878877

879-
override fun useUnorderedMapInDifferentiator(): Boolean {
880-
var cached = useUnorderedMapInDifferentiatorCache
881-
if (cached == null) {
882-
cached = ReactNativeFeatureFlagsCxxInterop.useUnorderedMapInDifferentiator()
883-
useUnorderedMapInDifferentiatorCache = cached
884-
}
885-
return cached
886-
}
887-
888878
override fun viewCullingOutsetRatio(): Double {
889879
var cached = viewCullingOutsetRatioCache
890880
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<<16ca9a4b47da90ea71300eb37287e28b>>
7+
* @generated SignedSource<<b63f95bdb6536ae1623bb4a69f2c4940>>
88
*/
99

1010
/**
@@ -198,8 +198,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
198198

199199
@DoNotStrip @JvmStatic public external fun useTurboModuleInterop(): Boolean
200200

201-
@DoNotStrip @JvmStatic public external fun useUnorderedMapInDifferentiator(): Boolean
202-
203201
@DoNotStrip @JvmStatic public external fun viewCullingOutsetRatio(): Double
204202

205203
@DoNotStrip @JvmStatic public external fun viewTransitionEnabled(): 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<<10e6516b3c9cf53ae2e48c8b8cd51033>>
7+
* @generated SignedSource<<960de240ad648acc1dca10a80e2bf8a5>>
88
*/
99

1010
/**
@@ -193,8 +193,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
193193

194194
override fun useTurboModuleInterop(): Boolean = false
195195

196-
override fun useUnorderedMapInDifferentiator(): Boolean = false
197-
198196
override fun viewCullingOutsetRatio(): Double = 0.0
199197

200198
override fun viewTransitionEnabled(): 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<<441fe8be28d4521e1fe9fe7b87b74cf2>>
7+
* @generated SignedSource<<39d4538c638e38cbd1655064edc74761>>
88
*/
99

1010
/**
@@ -109,7 +109,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
109109
private var useSharedAnimatedBackendCache: Boolean? = null
110110
private var useTraitHiddenOnAndroidCache: Boolean? = null
111111
private var useTurboModuleInteropCache: Boolean? = null
112-
private var useUnorderedMapInDifferentiatorCache: Boolean? = null
113112
private var viewCullingOutsetRatioCache: Double? = null
114113
private var viewTransitionEnabledCache: Boolean? = null
115114
private var viewTransitionUseHardwareBitmapAndroidCache: Boolean? = null
@@ -965,16 +964,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
965964
return cached
966965
}
967966

968-
override fun useUnorderedMapInDifferentiator(): Boolean {
969-
var cached = useUnorderedMapInDifferentiatorCache
970-
if (cached == null) {
971-
cached = currentProvider.useUnorderedMapInDifferentiator()
972-
accessedFeatureFlags.add("useUnorderedMapInDifferentiator")
973-
useUnorderedMapInDifferentiatorCache = cached
974-
}
975-
return cached
976-
}
977-
978967
override fun viewCullingOutsetRatio(): Double {
979968
var cached = viewCullingOutsetRatioCache
980969
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<<972dbaef144818484bafff334cf97ef2>>
7+
* @generated SignedSource<<4fa46d585a2fe3515557bf06f0e1189f>>
88
*/
99

1010
/**
@@ -193,8 +193,6 @@ public interface ReactNativeFeatureFlagsProvider {
193193

194194
@DoNotStrip public fun useTurboModuleInterop(): Boolean
195195

196-
@DoNotStrip public fun useUnorderedMapInDifferentiator(): Boolean
197-
198196
@DoNotStrip public fun viewCullingOutsetRatio(): Double
199197

200198
@DoNotStrip public fun viewTransitionEnabled(): 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<<bb79417efb0f63b2717ea8873b72da88>>
7+
* @generated SignedSource<<e289807a5e54422b373acc929ce31e10>>
88
*/
99

1010
/**
@@ -549,12 +549,6 @@ class ReactNativeFeatureFlagsJavaProvider
549549
return method(javaProvider_);
550550
}
551551

552-
bool useUnorderedMapInDifferentiator() override {
553-
static const auto method =
554-
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useUnorderedMapInDifferentiator");
555-
return method(javaProvider_);
556-
}
557-
558552
double viewCullingOutsetRatio() override {
559553
static const auto method =
560554
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jdouble()>("viewCullingOutsetRatio");
@@ -1008,11 +1002,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop(
10081002
return ReactNativeFeatureFlags::useTurboModuleInterop();
10091003
}
10101004

1011-
bool JReactNativeFeatureFlagsCxxInterop::useUnorderedMapInDifferentiator(
1012-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
1013-
return ReactNativeFeatureFlags::useUnorderedMapInDifferentiator();
1014-
}
1015-
10161005
double JReactNativeFeatureFlagsCxxInterop::viewCullingOutsetRatio(
10171006
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
10181007
return ReactNativeFeatureFlags::viewCullingOutsetRatio();
@@ -1319,9 +1308,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
13191308
makeNativeMethod(
13201309
"useTurboModuleInterop",
13211310
JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop),
1322-
makeNativeMethod(
1323-
"useUnorderedMapInDifferentiator",
1324-
JReactNativeFeatureFlagsCxxInterop::useUnorderedMapInDifferentiator),
13251311
makeNativeMethod(
13261312
"viewCullingOutsetRatio",
13271313
JReactNativeFeatureFlagsCxxInterop::viewCullingOutsetRatio),

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<<3007628255a078dafc01eb16b3d55fbe>>
7+
* @generated SignedSource<<8e51c38f988854dd63291df26a78326e>>
88
*/
99

1010
/**
@@ -285,9 +285,6 @@ class JReactNativeFeatureFlagsCxxInterop
285285
static bool useTurboModuleInterop(
286286
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
287287

288-
static bool useUnorderedMapInDifferentiator(
289-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
290-
291288
static double viewCullingOutsetRatio(
292289
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
293290

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<<5c308b51617953c21d3ae60dc8c530bb>>
7+
* @generated SignedSource<<a6fff34229abbd9beaa08bf39b379610>>
88
*/
99

1010
/**
@@ -366,10 +366,6 @@ bool ReactNativeFeatureFlags::useTurboModuleInterop() {
366366
return getAccessor().useTurboModuleInterop();
367367
}
368368

369-
bool ReactNativeFeatureFlags::useUnorderedMapInDifferentiator() {
370-
return getAccessor().useUnorderedMapInDifferentiator();
371-
}
372-
373369
double ReactNativeFeatureFlags::viewCullingOutsetRatio() {
374370
return getAccessor().viewCullingOutsetRatio();
375371
}

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

Lines changed: 1 addition & 6 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<<ac9244d8e244e6ee81a39b6c6d3fbf5e>>
7+
* @generated SignedSource<<6508c960d2b27f479ecb40056d5c7997>>
88
*/
99

1010
/**
@@ -464,11 +464,6 @@ class ReactNativeFeatureFlags {
464464
*/
465465
RN_EXPORT static bool useTurboModuleInterop();
466466

467-
/**
468-
* Use std::unordered_map instead of TinyMap in the Differentiator for improved lookup performance.
469-
*/
470-
RN_EXPORT static bool useUnorderedMapInDifferentiator();
471-
472467
/**
473468
* Outset the culling context frame with the provided ratio. The culling context frame size will be outset by width * ratio on the left and right, and height * ratio on the top and bottom.
474469
*/

0 commit comments

Comments
 (0)