clean up systrace for systrace View preallocation (#44956)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44956

changelog: [internal]

do not show systrace logs for flattened views.

Reviewed By: rubennorte

Differential Revision: D58587946

fbshipit-source-id: 6ef12feb352b9c79db6b91767c2d77906bba9cdc
This commit is contained in:
Samuel Susla
2024-06-17 06:51:24 -07:00
committed by Facebook GitHub Bot
parent 6f7eae5c58
commit a6b862d427
3 changed files with 6 additions and 6 deletions
@@ -509,10 +509,6 @@ void Binding::schedulerShouldRenderTransactions(
void Binding::schedulerDidRequestPreliminaryViewAllocation(
const ShadowNode& shadowNode) {
if (!shadowNode.getTraits().check(ShadowNodeTraits::Trait::FormsView)) {
return;
}
auto mountingManager = getMountingManager("preallocateView");
if (!mountingManager) {
return;
@@ -786,6 +786,12 @@ void FabricMountingManager::executeMount(
void FabricMountingManager::preallocateShadowView(
const ShadowNode& shadowNode) {
if (!shadowNode.getTraits().check(ShadowNodeTraits::Trait::FormsView)) {
return;
}
SystraceSection section("FabricMountingManager::preallocateShadowView");
{
std::lock_guard lock(allocatedViewsMutex_);
auto allocatedViewsIterator =
@@ -310,8 +310,6 @@ void Scheduler::uiManagerDidFinishTransaction(
}
void Scheduler::uiManagerDidCreateShadowNode(const ShadowNode& shadowNode) {
SystraceSection s("Scheduler::uiManagerDidCreateShadowNode");
if (delegate_ != nullptr) {
delegate_->schedulerDidRequestPreliminaryViewAllocation(shadowNode);
}