mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add feature flag to disable pre-allocation on clone
Summary: Disables preallocation for cloned nodes, switching to create during commit for those cases instead. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D34555621 fbshipit-source-id: 21fc834cea318ca299aa37a9aab28a2f2a9675b5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f47082be11
commit
131844f40e
@@ -367,6 +367,9 @@ void Binding::installFabricUIManager(
|
||||
disableRevisionCheckForPreallocation_ =
|
||||
config->getBool("react_fabric:disable_revision_check_for_preallocation");
|
||||
|
||||
disablePreallocationOnClone_ = config->getBool(
|
||||
"react_native_new_architecture:disable_preallocation_on_clone_android");
|
||||
|
||||
if (enableFabricLogs_) {
|
||||
LOG(WARNING) << "Binding::installFabricUIManager() was called (address: "
|
||||
<< this << ").";
|
||||
@@ -505,6 +508,9 @@ void Binding::schedulerDidCloneShadowNode(
|
||||
SurfaceId surfaceId,
|
||||
ShadowNode const &oldShadowNode,
|
||||
ShadowNode const &newShadowNode) {
|
||||
if (disablePreallocationOnClone_) {
|
||||
return;
|
||||
}
|
||||
// This is only necessary if view preallocation was skipped during
|
||||
// createShadowNode
|
||||
|
||||
|
||||
@@ -156,6 +156,7 @@ class Binding : public jni::HybridClass<Binding>,
|
||||
bool enableFabricLogs_{false};
|
||||
bool disableRevisionCheckForPreallocation_{false};
|
||||
bool dispatchPreallocationInBackground_{false};
|
||||
bool disablePreallocationOnClone_{false};
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
|
||||
Reference in New Issue
Block a user