mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Ship "Disable 'virtual view' preallocation" experiment in code
Summary: The impact of this has proven impressive, and safe. Ship in code and remove feature-flag. Changelog: [Internal] Reviewed By: philIip Differential Revision: D30269561 fbshipit-source-id: 9bb72567cfd881928d14d9bee43cf32b390664fb
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d75683ac94
commit
10cd2730af
@@ -557,9 +557,6 @@ void Binding::installFabricUIManager(
|
||||
disablePreallocateViews_ = reactNativeConfig_->getBool(
|
||||
"react_fabric:disabled_view_preallocation_android");
|
||||
|
||||
disableVirtualNodePreallocation_ = reactNativeConfig_->getBool(
|
||||
"react_fabric:disable_virtual_node_preallocation");
|
||||
|
||||
enableEarlyEventEmitterUpdate_ = reactNativeConfig_->getBool(
|
||||
"react_fabric:enable_early_event_emitter_update");
|
||||
|
||||
@@ -1194,8 +1191,7 @@ void Binding::schedulerDidRequestPreliminaryViewAllocation(
|
||||
|
||||
auto shadowView = ShadowView(shadowNode);
|
||||
|
||||
if (disableVirtualNodePreallocation_ &&
|
||||
!shadowView.traits.check(ShadowNodeTraits::Trait::FormsView)) {
|
||||
if (!shadowView.traits.check(ShadowNodeTraits::Trait::FormsView)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1208,9 +1204,6 @@ void Binding::schedulerDidCloneShadowNode(
|
||||
const ShadowNode &newShadowNode) {
|
||||
// This is only necessary if view preallocation was skipped during
|
||||
// createShadowNode
|
||||
if (!disableVirtualNodePreallocation_) {
|
||||
return;
|
||||
}
|
||||
|
||||
// We may need to PreAllocate a ShadowNode at this point if this is the
|
||||
// earliest point it is possible to do so:
|
||||
|
||||
@@ -197,7 +197,6 @@ class Binding : public jni::HybridClass<Binding>,
|
||||
|
||||
std::shared_ptr<const ReactNativeConfig> reactNativeConfig_{nullptr};
|
||||
bool disablePreallocateViews_{false};
|
||||
bool disableVirtualNodePreallocation_{false};
|
||||
bool enableFabricLogs_{false};
|
||||
bool enableEarlyEventEmitterUpdate_{false};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user