Ship large meassure cache in all platforms
Summary: Ship large meassure cache in all platforms changelog: [internal] internal Reviewed By: sammy-SC Differential Revision: D40356835 fbshipit-source-id: 315862d7aa705e83086e102e20fe2c20fb3210b2
This commit is contained in:
Родитель
4f7b4d8cbb
Коммит
9578c2cadf
|
@ -84,12 +84,6 @@ public class ReactFeatureFlags {
|
|||
|
||||
public static boolean insertZReorderBarriersOnViewGroupChildren = true;
|
||||
|
||||
/**
|
||||
* Feature Flag to control the size of the cache used by TextLayoutManager in Fabric. Used from
|
||||
* JNI.
|
||||
*/
|
||||
public static boolean enableLargeTextMeasureCache = true;
|
||||
|
||||
public static boolean dispatchPointerEvents = false;
|
||||
|
||||
/** Feature Flag to enable the pending event queue in fabric before mounting views */
|
||||
|
|
|
@ -443,10 +443,6 @@ void Binding::installFabricUIManager(
|
|||
dispatchPreallocationInBackground_ = reactNativeConfig_->getBool(
|
||||
"react_native_new_architecture:dispatch_preallocation_in_bg");
|
||||
|
||||
contextContainer->insert(
|
||||
"EnableLargeTextMeasureCache",
|
||||
getFeatureFlagValue("enableLargeTextMeasureCache"));
|
||||
|
||||
// Props setter pattern feature
|
||||
CoreFeatures::enablePropIteratorSetter =
|
||||
getFeatureFlagValue("enableCppPropsIteratorSetter");
|
||||
|
|
|
@ -71,7 +71,7 @@ class TextMeasureCacheKey final {
|
|||
* The number was empirically chosen based on approximation of an average amount
|
||||
* of meaningful measures per surface.
|
||||
*/
|
||||
constexpr auto kSimpleThreadSafeCacheSizeCap = size_t{256};
|
||||
constexpr auto kSimpleThreadSafeCacheSizeCap = size_t{1024};
|
||||
|
||||
/*
|
||||
* Thread-safe, evicting hash table designed to store text measurement
|
||||
|
|
|
@ -146,10 +146,7 @@ Size measureAndroidComponentMapBuffer(
|
|||
TextLayoutManager::TextLayoutManager(
|
||||
const ContextContainer::Shared &contextContainer)
|
||||
: contextContainer_(contextContainer),
|
||||
measureCache_(
|
||||
contextContainer->at<bool>("EnableLargeTextMeasureCache")
|
||||
? 1024
|
||||
: kSimpleThreadSafeCacheSizeCap) {}
|
||||
measureCache_(kSimpleThreadSafeCacheSizeCap) {}
|
||||
|
||||
void *TextLayoutManager::getNativeTextLayoutManager() const {
|
||||
return self_;
|
||||
|
|
Загрузка…
Ссылка в новой задаче