Skip to content

Commit 842b9c1

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Temporary remove systraces from Fabric core code
Summary: This is a temporary change to measure production data Reviewed By: fkgozali Differential Revision: D13906807 fbshipit-source-id: 2a2f71aa379c4aca63c7bb4a9644704f713cb088
1 parent 8110909 commit 842b9c1

File tree

8 files changed

+0
-54
lines changed

8 files changed

+0
-54
lines changed

ReactCommon/fabric/components/root/RootShadowNode.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@
88
#include "RootShadowNode.h"
99

1010
#include <react/components/view/conversions.h>
11-
#include <react/debug/SystraceSection.h>
1211

1312
namespace facebook {
1413
namespace react {
1514

1615
const char RootComponentName[] = "RootView";
1716

1817
void RootShadowNode::layout() {
19-
SystraceSection s("RootShadowNode::layout");
2018
ensureUnsealed();
2119
layout(getProps()->layoutContext);
2220

ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <react/core/LayoutConstraints.h>
1515
#include <react/core/LayoutContext.h>
1616
#include <react/debug/DebugStringConvertibleItem.h>
17-
#include <react/debug/SystraceSection.h>
1817
#include <yoga/Yoga.h>
1918

2019
namespace facebook {
@@ -117,7 +116,6 @@ void YogaLayoutableShadowNode::layout(LayoutContext layoutContext) {
117116
yogaConfig_.pointScaleFactor = layoutContext.pointScaleFactor;
118117

119118
{
120-
SystraceSection s("YogaLayoutableShadowNode::YGNodeCalculateLayout");
121119

122120
YGNodeCalculateLayout(
123121
&yogaNode_, YGUndefined, YGUndefined, YGDirectionInherit);
@@ -159,7 +157,6 @@ YGNode *YogaLayoutableShadowNode::yogaNodeCloneCallbackConnector(
159157
YGNode *oldYogaNode,
160158
YGNode *parentYogaNode,
161159
int childIndex) {
162-
SystraceSection s("YogaLayoutableShadowNode::yogaNodeCloneCallbackConnector");
163160

164161
// At this point it is garanteed that all shadow nodes associated with yoga
165162
// nodes are `YogaLayoutableShadowNode` subclasses.
@@ -178,8 +175,6 @@ YGSize YogaLayoutableShadowNode::yogaNodeMeasureCallbackConnector(
178175
YGMeasureMode widthMode,
179176
float height,
180177
YGMeasureMode heightMode) {
181-
SystraceSection s(
182-
"YogaLayoutableShadowNode::yogaNodeMeasureCallbackConnector");
183178

184179
auto shadowNodeRawPtr =
185180
static_cast<YogaLayoutableShadowNode *>(yogaNode->getContext());

ReactCommon/fabric/events/EventEmitter.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include <folly/dynamic.h>
1111
#include <jsi/JSIDynamic.h>
1212
#include <jsi/jsi.h>
13-
#include <react/debug/SystraceSection.h>
1413

1514
#include "RawEvent.h"
1615

@@ -65,8 +64,6 @@ void EventEmitter::dispatchEvent(
6564
const std::string &type,
6665
const ValueFactory &payloadFactory,
6766
const EventPriority &priority) const {
68-
SystraceSection s("EventEmitter::dispatchEvent");
69-
7067
auto eventDispatcher = eventDispatcher_.lock();
7168
if (!eventDispatcher) {
7269
return;

ReactCommon/fabric/mounting/Differentiator.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "Differentiator.h"
77

88
#include <react/core/LayoutableShadowNode.h>
9-
#include <react/debug/SystraceSection.h>
109
#include "ShadowView.h"
1110

1211
namespace facebook {
@@ -215,8 +214,6 @@ static void calculateShadowViewMutations(
215214
ShadowViewMutationList calculateShadowViewMutations(
216215
const ShadowNode &oldRootShadowNode,
217216
const ShadowNode &newRootShadowNode) {
218-
SystraceSection s("calculateShadowViewMutations");
219-
220217
// Root shadow nodes must have same tag.
221218
assert(oldRootShadowNode.getTag() == newRootShadowNode.getTag());
222219

ReactCommon/fabric/uimanager/Scheduler.cpp

-17
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include <jsi/jsi.h>
99

1010
#include <react/core/LayoutContext.h>
11-
#include <react/debug/SystraceSection.h>
1211
#include <react/uimanager/ComponentDescriptorRegistry.h>
1312
#include <react/uimanager/UIManager.h>
1413
#include <react/uimanager/UIManagerBinding.h>
@@ -69,8 +68,6 @@ void Scheduler::startSurface(
6968
const folly::dynamic &initialProps,
7069
const LayoutConstraints &layoutConstraints,
7170
const LayoutContext &layoutContext) const {
72-
SystraceSection s("Scheduler::startSurface");
73-
7471
auto shadowTree =
7572
std::make_unique<ShadowTree>(surfaceId, layoutConstraints, layoutContext);
7673
shadowTree->setDelegate(this);
@@ -88,8 +85,6 @@ void Scheduler::startSurface(
8885
void Scheduler::renderTemplateToSurface(
8986
SurfaceId surfaceId,
9087
const std::string &uiTemplate) {
91-
SystraceSection s("Scheduler::renderTemplateToSurface");
92-
9388
try {
9489
if (uiTemplate.size() == 0) {
9590
return;
@@ -120,8 +115,6 @@ void Scheduler::renderTemplateToSurface(
120115
}
121116

122117
void Scheduler::stopSurface(SurfaceId surfaceId) const {
123-
SystraceSection s("Scheduler::stopSurface");
124-
125118
shadowTreeRegistry_.visit(surfaceId, [](const ShadowTree &shadowTree) {
126119
// As part of stopping the Surface, we have to commit an empty tree.
127120
return shadowTree.tryCommit(
@@ -147,8 +140,6 @@ Size Scheduler::measureSurface(
147140
SurfaceId surfaceId,
148141
const LayoutConstraints &layoutConstraints,
149142
const LayoutContext &layoutContext) const {
150-
SystraceSection s("Scheduler::measureSurface");
151-
152143
Size size;
153144
shadowTreeRegistry_.visit(surfaceId, [&](const ShadowTree &shadowTree) {
154145
shadowTree.tryCommit([&](const SharedRootShadowNode &oldRootShadowNode) {
@@ -166,8 +157,6 @@ void Scheduler::constraintSurfaceLayout(
166157
SurfaceId surfaceId,
167158
const LayoutConstraints &layoutConstraints,
168159
const LayoutContext &layoutContext) const {
169-
SystraceSection s("Scheduler::constraintSurfaceLayout");
170-
171160
shadowTreeRegistry_.visit(surfaceId, [&](const ShadowTree &shadowTree) {
172161
shadowTree.commit([&](const SharedRootShadowNode &oldRootShadowNode) {
173162
return oldRootShadowNode->clone(layoutConstraints, layoutContext);
@@ -190,8 +179,6 @@ SchedulerDelegate *Scheduler::getDelegate() const {
190179
void Scheduler::shadowTreeDidCommit(
191180
const ShadowTree &shadowTree,
192181
const ShadowViewMutationList &mutations) const {
193-
SystraceSection s("Scheduler::shadowTreeDidCommit");
194-
195182
if (delegate_) {
196183
delegate_->schedulerDidFinishTransaction(
197184
shadowTree.getSurfaceId(), mutations);
@@ -203,8 +190,6 @@ void Scheduler::shadowTreeDidCommit(
203190
void Scheduler::uiManagerDidFinishTransaction(
204191
SurfaceId surfaceId,
205192
const SharedShadowNodeUnsharedList &rootChildNodes) {
206-
SystraceSection s("Scheduler::uiManagerDidFinishTransaction");
207-
208193
shadowTreeRegistry_.visit(surfaceId, [&](const ShadowTree &shadowTree) {
209194
shadowTree.commit([&](const SharedRootShadowNode &oldRootShadowNode) {
210195
return std::make_shared<RootShadowNode>(
@@ -215,8 +200,6 @@ void Scheduler::uiManagerDidFinishTransaction(
215200

216201
void Scheduler::uiManagerDidCreateShadowNode(
217202
const SharedShadowNode &shadowNode) {
218-
SystraceSection s("Scheduler::uiManagerDidCreateShadowNode");
219-
220203
if (delegate_) {
221204
auto layoutableShadowNode =
222205
dynamic_cast<const LayoutableShadowNode *>(shadowNode.get());

ReactCommon/fabric/uimanager/ShadowTree.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
#include <react/core/LayoutContext.h>
99
#include <react/core/LayoutPrimitives.h>
10-
#include <react/debug/SystraceSection.h>
1110
#include <react/mounting/Differentiator.h>
1211
#include <react/mounting/ShadowViewMutation.h>
1312

@@ -111,8 +110,6 @@ Tag ShadowTree::getSurfaceId() const {
111110

112111
void ShadowTree::commit(ShadowTreeCommitTransaction transaction, int *revision)
113112
const {
114-
SystraceSection s("ShadowTree::commit");
115-
116113
int attempts = 0;
117114

118115
while (true) {
@@ -130,8 +127,6 @@ void ShadowTree::commit(ShadowTreeCommitTransaction transaction, int *revision)
130127
bool ShadowTree::tryCommit(
131128
ShadowTreeCommitTransaction transaction,
132129
int *revision) const {
133-
SystraceSection s("ShadowTree::tryCommit");
134-
135130
SharedRootShadowNode oldRootShadowNode;
136131

137132
{
@@ -188,8 +183,6 @@ bool ShadowTree::tryCommit(
188183

189184
void ShadowTree::emitLayoutEvents(
190185
const ShadowViewMutationList &mutations) const {
191-
SystraceSection s("ShadowTree::emitLayoutEvents");
192-
193186
for (const auto &mutation : mutations) {
194187
// Only `Insert` and `Update` mutations can affect layout metrics.
195188
if (mutation.type != ShadowViewMutation::Insert &&

ReactCommon/fabric/uimanager/UIManager.cpp

-13
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include "UIManager.h"
44

55
#include <react/core/ShadowNodeFragment.h>
6-
#include <react/debug/SystraceSection.h>
76

87
namespace facebook {
98
namespace react {
@@ -14,8 +13,6 @@ SharedShadowNode UIManager::createNode(
1413
SurfaceId surfaceId,
1514
const RawProps &rawProps,
1615
SharedEventTarget eventTarget) const {
17-
SystraceSection s("UIManager::createNode");
18-
1916
auto &componentDescriptor = componentDescriptorRegistry_->at(name);
2017

2118
auto shadowNode = componentDescriptor.createShadowNode(
@@ -36,8 +33,6 @@ SharedShadowNode UIManager::cloneNode(
3633
const SharedShadowNode &shadowNode,
3734
const SharedShadowNodeSharedList &children,
3835
const folly::Optional<RawProps> &rawProps) const {
39-
SystraceSection s("UIManager::cloneNode");
40-
4136
auto &componentDescriptor =
4237
componentDescriptorRegistry_->at(shadowNode->getComponentHandle());
4338

@@ -57,8 +52,6 @@ SharedShadowNode UIManager::cloneNode(
5752
void UIManager::appendChild(
5853
const SharedShadowNode &parentShadowNode,
5954
const SharedShadowNode &childShadowNode) const {
60-
SystraceSection s("UIManager::appendChild");
61-
6255
auto &componentDescriptor =
6356
componentDescriptorRegistry_->at(parentShadowNode->getComponentHandle());
6457
componentDescriptor.appendChild(parentShadowNode, childShadowNode);
@@ -67,8 +60,6 @@ void UIManager::appendChild(
6760
void UIManager::completeSurface(
6861
SurfaceId surfaceId,
6962
const SharedShadowNodeUnsharedList &rootChildren) const {
70-
SystraceSection s("UIManager::completeSurface");
71-
7263
if (delegate_) {
7364
delegate_->uiManagerDidFinishTransaction(surfaceId, rootChildren);
7465
}
@@ -77,8 +68,6 @@ void UIManager::completeSurface(
7768
void UIManager::setNativeProps(
7869
const SharedShadowNode &shadowNode,
7970
const RawProps &rawProps) const {
80-
SystraceSection s("UIManager::setNativeProps");
81-
8271
auto &componentDescriptor =
8372
componentDescriptorRegistry_->at(shadowNode->getComponentHandle());
8473
auto props = componentDescriptor.cloneProps(shadowNode->getProps(), rawProps);
@@ -96,8 +85,6 @@ void UIManager::setNativeProps(
9685
LayoutMetrics UIManager::getRelativeLayoutMetrics(
9786
const ShadowNode &shadowNode,
9887
const ShadowNode *ancestorShadowNode) const {
99-
SystraceSection s("UIManager::getRelativeLayoutMetrics");
100-
10188
if (!ancestorShadowNode) {
10289
shadowTreeRegistry_->visit(
10390
shadowNode.getRootTag(), [&](const ShadowTree &shadowTree) {

ReactCommon/fabric/uimanager/UIManagerBinding.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
#include "UIManagerBinding.h"
44

5-
#include <react/debug/SystraceSection.h>
6-
75
#include <jsi/JSIDynamic.h>
86

97
namespace facebook {
@@ -68,8 +66,6 @@ void UIManagerBinding::dispatchEvent(
6866
const EventTarget *eventTarget,
6967
const std::string &type,
7068
const ValueFactory &payloadFactory) const {
71-
SystraceSection s("UIManagerBinding::dispatchEvent");
72-
7369
auto payload = payloadFactory(runtime);
7470

7571
auto instanceHandle = eventTarget

0 commit comments

Comments
 (0)