Skip to content

Commit 92a3c24

Browse files
sammy-SCmeta-codesync[bot]
authored andcommitted
Ship useUnorderedMapInDifferentiator
Summary: changelog: [internal] the experiment was neutral, let's ship it to simplify code Differential Revision: D105943424
1 parent 26790cf commit 92a3c24

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<<56c989556810840e2dd2a42b66d431dc>>
7+
* @generated SignedSource<<6435f36d035c9e6156ca406c52c32f97>>
88
*/
99

1010
/**
@@ -552,12 +552,6 @@ public object ReactNativeFeatureFlags {
552552
@JvmStatic
553553
public fun useTurboModules(): Boolean = accessor.useTurboModules()
554554

555-
/**
556-
* Use std::unordered_map instead of TinyMap in the Differentiator for improved lookup performance.
557-
*/
558-
@JvmStatic
559-
public fun useUnorderedMapInDifferentiator(): Boolean = accessor.useUnorderedMapInDifferentiator()
560-
561555
/**
562556
* 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.
563557
*/

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<<43aa532756b07f0b754cd74eb4811664>>
7+
* @generated SignedSource<<846ef4482c364c5bdc7a53fb5cf13b7a>>
88
*/
99

1010
/**
@@ -107,7 +107,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
107107
private var useTraitHiddenOnAndroidCache: Boolean? = null
108108
private var useTurboModuleInteropCache: Boolean? = null
109109
private var useTurboModulesCache: Boolean? = null
110-
private var useUnorderedMapInDifferentiatorCache: Boolean? = null
111110
private var viewCullingOutsetRatioCache: Double? = null
112111
private var viewTransitionEnabledCache: Boolean? = null
113112
private var viewTransitionUseHardwareBitmapAndroidCache: Boolean? = null
@@ -896,15 +895,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
896895
return cached
897896
}
898897

899-
override fun useUnorderedMapInDifferentiator(): Boolean {
900-
var cached = useUnorderedMapInDifferentiatorCache
901-
if (cached == null) {
902-
cached = ReactNativeFeatureFlagsCxxInterop.useUnorderedMapInDifferentiator()
903-
useUnorderedMapInDifferentiatorCache = cached
904-
}
905-
return cached
906-
}
907-
908898
override fun viewCullingOutsetRatio(): Double {
909899
var cached = viewCullingOutsetRatioCache
910900
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<<5cb98793989e603846a2008aa1a6af41>>
7+
* @generated SignedSource<<220fb16555e971c9044e337490a9666f>>
88
*/
99

1010
/**
@@ -202,8 +202,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
202202

203203
@DoNotStrip @JvmStatic public external fun useTurboModules(): Boolean
204204

205-
@DoNotStrip @JvmStatic public external fun useUnorderedMapInDifferentiator(): Boolean
206-
207205
@DoNotStrip @JvmStatic public external fun viewCullingOutsetRatio(): Double
208206

209207
@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<<f4b6d9ed2f6ccff6ab01e53f6048423c>>
7+
* @generated SignedSource<<78f2c235e31f57bc005e50215014fb36>>
88
*/
99

1010
/**
@@ -197,8 +197,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
197197

198198
override fun useTurboModules(): Boolean = false
199199

200-
override fun useUnorderedMapInDifferentiator(): Boolean = false
201-
202200
override fun viewCullingOutsetRatio(): Double = 0.0
203201

204202
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<<6ee1cc911c3ebb12b31151441dd43605>>
7+
* @generated SignedSource<<6bb61ed8b333abcfd38da1c2ef19f421>>
88
*/
99

1010
/**
@@ -111,7 +111,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
111111
private var useTraitHiddenOnAndroidCache: Boolean? = null
112112
private var useTurboModuleInteropCache: Boolean? = null
113113
private var useTurboModulesCache: Boolean? = null
114-
private var useUnorderedMapInDifferentiatorCache: Boolean? = null
115114
private var viewCullingOutsetRatioCache: Double? = null
116115
private var viewTransitionEnabledCache: Boolean? = null
117116
private var viewTransitionUseHardwareBitmapAndroidCache: Boolean? = null
@@ -987,16 +986,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
987986
return cached
988987
}
989988

990-
override fun useUnorderedMapInDifferentiator(): Boolean {
991-
var cached = useUnorderedMapInDifferentiatorCache
992-
if (cached == null) {
993-
cached = currentProvider.useUnorderedMapInDifferentiator()
994-
accessedFeatureFlags.add("useUnorderedMapInDifferentiator")
995-
useUnorderedMapInDifferentiatorCache = cached
996-
}
997-
return cached
998-
}
999-
1000989
override fun viewCullingOutsetRatio(): Double {
1001990
var cached = viewCullingOutsetRatioCache
1002991
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<<9945400608426bf3aa1163b9f212d07c>>
7+
* @generated SignedSource<<af3130efca40b595fbb0aa0a15770a05>>
88
*/
99

1010
/**
@@ -197,8 +197,6 @@ public interface ReactNativeFeatureFlagsProvider {
197197

198198
@DoNotStrip public fun useTurboModules(): Boolean
199199

200-
@DoNotStrip public fun useUnorderedMapInDifferentiator(): Boolean
201-
202200
@DoNotStrip public fun viewCullingOutsetRatio(): Double
203201

204202
@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<<50f384f98360c4fc9d16d7c25b82aec6>>
7+
* @generated SignedSource<<3194d64185f009102ffc2f218451b912>>
88
*/
99

1010
/**
@@ -561,12 +561,6 @@ class ReactNativeFeatureFlagsJavaProvider
561561
return method(javaProvider_);
562562
}
563563

564-
bool useUnorderedMapInDifferentiator() override {
565-
static const auto method =
566-
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useUnorderedMapInDifferentiator");
567-
return method(javaProvider_);
568-
}
569-
570564
double viewCullingOutsetRatio() override {
571565
static const auto method =
572566
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jdouble()>("viewCullingOutsetRatio");
@@ -1030,11 +1024,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useTurboModules(
10301024
return ReactNativeFeatureFlags::useTurboModules();
10311025
}
10321026

1033-
bool JReactNativeFeatureFlagsCxxInterop::useUnorderedMapInDifferentiator(
1034-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
1035-
return ReactNativeFeatureFlags::useUnorderedMapInDifferentiator();
1036-
}
1037-
10381027
double JReactNativeFeatureFlagsCxxInterop::viewCullingOutsetRatio(
10391028
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
10401029
return ReactNativeFeatureFlags::viewCullingOutsetRatio();
@@ -1347,9 +1336,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
13471336
makeNativeMethod(
13481337
"useTurboModules",
13491338
JReactNativeFeatureFlagsCxxInterop::useTurboModules),
1350-
makeNativeMethod(
1351-
"useUnorderedMapInDifferentiator",
1352-
JReactNativeFeatureFlagsCxxInterop::useUnorderedMapInDifferentiator),
13531339
makeNativeMethod(
13541340
"viewCullingOutsetRatio",
13551341
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<<7a73667c552251d722f6c9800f53d251>>
7+
* @generated SignedSource<<434594f8c9022e0fb028be591ac4147c>>
88
*/
99

1010
/**
@@ -291,9 +291,6 @@ class JReactNativeFeatureFlagsCxxInterop
291291
static bool useTurboModules(
292292
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
293293

294-
static bool useUnorderedMapInDifferentiator(
295-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
296-
297294
static double viewCullingOutsetRatio(
298295
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
299296

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<<8233ac72d584e038a6c1d94bea37ea40>>
7+
* @generated SignedSource<<6cf8cc4c41d2747fb2dabaddff723d88>>
88
*/
99

1010
/**
@@ -374,10 +374,6 @@ bool ReactNativeFeatureFlags::useTurboModules() {
374374
return getAccessor().useTurboModules();
375375
}
376376

377-
bool ReactNativeFeatureFlags::useUnorderedMapInDifferentiator() {
378-
return getAccessor().useUnorderedMapInDifferentiator();
379-
}
380-
381377
double ReactNativeFeatureFlags::viewCullingOutsetRatio() {
382378
return getAccessor().viewCullingOutsetRatio();
383379
}

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<<501a0efcf0a4ab20827bdefc3a844b3f>>
7+
* @generated SignedSource<<71219a9ff75aaaf54d0041722d8f44a2>>
88
*/
99

1010
/**
@@ -474,11 +474,6 @@ class ReactNativeFeatureFlags {
474474
*/
475475
RN_EXPORT static bool useTurboModules();
476476

477-
/**
478-
* Use std::unordered_map instead of TinyMap in the Differentiator for improved lookup performance.
479-
*/
480-
RN_EXPORT static bool useUnorderedMapInDifferentiator();
481-
482477
/**
483478
* 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.
484479
*/

0 commit comments

Comments
 (0)