From d456e50bb0984374c6909b2872dde4ae2a6ae727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Tue, 12 Mar 2024 08:59:30 -0700 Subject: [PATCH] Add new systrace sections in MountingCoordinator (#43408) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43408 Changelog: [internal] I think mount operations are taking longer than expected because of a debugging block (that we might remove). This adds some systrace sections to distinguish that from the overall time and confirm this only happens in debug builds. Reviewed By: sammy-SC Differential Revision: D54746491 fbshipit-source-id: 317b22b6dcd1ae117ed4a013180df8842bf712f0 --- .../react/renderer/mounting/MountingCoordinator.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp b/packages/react-native/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp index 9a8a36e7a7a..6a0db7ab426 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp +++ b/packages/react-native/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp @@ -106,6 +106,8 @@ std::optional MountingCoordinator::pullTransaction() mountingOverrideDelegate->shouldOverridePullTransaction(); if (shouldOverridePullTransaction) { + SystraceSection section2("MountingCoordinator::overridePullTransaction"); + auto mutations = ShadowViewMutation::List{}; auto telemetry = TransactionTelemetry{}; @@ -128,6 +130,9 @@ std::optional MountingCoordinator::pullTransaction() #ifdef RN_SHADOW_TREE_INTROSPECTION if (transaction.has_value()) { + SystraceSection section2( + "MountingCoordinator::verifyMutationsForDebugging"); + // We have something to validate. auto mutations = transaction->getMutations();