From 10cd2730af60ff8ac2425040457c9889307f4296 Mon Sep 17 00:00:00 2001 From: Joshua Gross Date: Wed, 18 Aug 2021 21:17:58 -0700 Subject: [PATCH] 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 --- .../main/java/com/facebook/react/fabric/jni/Binding.cpp | 9 +-------- .../main/java/com/facebook/react/fabric/jni/Binding.h | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp index ac1cebf82a2..d7fb074d31c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp @@ -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: diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.h b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.h index defc80a3d23..d3045b0e1b1 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.h +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.h @@ -197,7 +197,6 @@ class Binding : public jni::HybridClass, std::shared_ptr reactNativeConfig_{nullptr}; bool disablePreallocateViews_{false}; - bool disableVirtualNodePreallocation_{false}; bool enableFabricLogs_{false}; bool enableEarlyEventEmitterUpdate_{false}; };