mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Ship State Reconciliation 100% on all platforms
Summary: State Reconciliation has been running 50/50 for a while and all metrics look stable. This is necessary for providing a good experience so we should ship to everyone unconditionally. Changelog: [Internal] Fabric diffing reconciliation process improvement Reviewed By: mdvacca Differential Revision: D20715694 fbshipit-source-id: 25b2635ecc29b67e2911679c9db66bc84d37dec1
This commit is contained in:
1 parent
da8cccb012
commit
c3d0f3b2de
3 files changed
+4
-20
No files matched your search
@@ -65,15 +65,6 @@ Scheduler::Scheduler(
|
||||
uiManager->setDelegate(this);
|
||||
uiManager->setComponentDescriptorRegistry(componentDescriptorRegistry_);
|
||||
|
||||
#ifdef ANDROID
|
||||
bool stateReconciliationEnabled = reactNativeConfig_->getBool(
|
||||
"react_fabric:enabled_state_reconciliation_android");
|
||||
#else
|
||||
bool stateReconciliationEnabled = reactNativeConfig_->getBool(
|
||||
"react_fabric:enabled_state_reconciliation_ios");
|
||||
#endif
|
||||
uiManager->setStateReconciliationEnabled(stateReconciliationEnabled);
|
||||
|
||||
runtimeExecutor_([=](jsi::Runtime &runtime) {
|
||||
auto uiManagerBinding = UIManagerBinding::createAndInstallIfNeeded(runtime);
|
||||
uiManagerBinding->attach(uiManager);
|
||||
|
||||
@@ -105,14 +105,10 @@ void UIManager::completeSurface(
|
||||
/* .children = */ rootChildren,
|
||||
});
|
||||
},
|
||||
stateReconciliationEnabled_);
|
||||
true);
|
||||
});
|
||||
}
|
||||
|
||||
void UIManager::setStateReconciliationEnabled(bool enabled) {
|
||||
stateReconciliationEnabled_ = enabled;
|
||||
}
|
||||
|
||||
void UIManager::setJSResponder(
|
||||
const ShadowNode::Shared &shadowNode,
|
||||
const bool blockNativeResponder) const {
|
||||
@@ -148,7 +144,7 @@ ShadowNode::Shared const *UIManager::getNewestCloneOfShadowNode(
|
||||
ancestorShadowNode = oldRootShadowNode.get();
|
||||
return nullptr;
|
||||
},
|
||||
stateReconciliationEnabled_);
|
||||
true);
|
||||
});
|
||||
|
||||
auto ancestors = shadowNode->getFamily().getAncestors(*ancestorShadowNode);
|
||||
@@ -184,7 +180,7 @@ void UIManager::setNativeProps(
|
||||
});
|
||||
}));
|
||||
},
|
||||
stateReconciliationEnabled_);
|
||||
true);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -202,7 +198,7 @@ LayoutMetrics UIManager::getRelativeLayoutMetrics(
|
||||
ancestorShadowNode = oldRootShadowNode.get();
|
||||
return nullptr;
|
||||
},
|
||||
stateReconciliationEnabled_);
|
||||
true);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -55,8 +55,6 @@ class UIManager final : public ShadowTreeDelegate {
|
||||
ShadowTree const &shadowTree,
|
||||
MountingCoordinator::Shared const &mountingCoordinator) const override;
|
||||
|
||||
void setStateReconciliationEnabled(bool enabled);
|
||||
|
||||
private:
|
||||
friend class UIManagerBinding;
|
||||
friend class Scheduler;
|
||||
@@ -124,7 +122,6 @@ class UIManager final : public ShadowTreeDelegate {
|
||||
UIManagerDelegate *delegate_;
|
||||
UIManagerBinding *uiManagerBinding_;
|
||||
ShadowTreeRegistry shadowTreeRegistry_{};
|
||||
bool stateReconciliationEnabled_{false};
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
|
||||
Reference in new issue
Block a user