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
This commit is contained in:
Родитель
8110909526
Коммит
842b9c106a
|
@ -8,7 +8,6 @@
|
|||
#include "RootShadowNode.h"
|
||||
|
||||
#include <react/components/view/conversions.h>
|
||||
#include <react/debug/SystraceSection.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
@ -16,7 +15,6 @@ namespace react {
|
|||
const char RootComponentName[] = "RootView";
|
||||
|
||||
void RootShadowNode::layout() {
|
||||
SystraceSection s("RootShadowNode::layout");
|
||||
ensureUnsealed();
|
||||
layout(getProps()->layoutContext);
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include <react/core/LayoutConstraints.h>
|
||||
#include <react/core/LayoutContext.h>
|
||||
#include <react/debug/DebugStringConvertibleItem.h>
|
||||
#include <react/debug/SystraceSection.h>
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
namespace facebook {
|
||||
|
@ -117,7 +116,6 @@ void YogaLayoutableShadowNode::layout(LayoutContext layoutContext) {
|
|||
yogaConfig_.pointScaleFactor = layoutContext.pointScaleFactor;
|
||||
|
||||
{
|
||||
SystraceSection s("YogaLayoutableShadowNode::YGNodeCalculateLayout");
|
||||
|
||||
YGNodeCalculateLayout(
|
||||
&yogaNode_, YGUndefined, YGUndefined, YGDirectionInherit);
|
||||
|
@ -159,7 +157,6 @@ YGNode *YogaLayoutableShadowNode::yogaNodeCloneCallbackConnector(
|
|||
YGNode *oldYogaNode,
|
||||
YGNode *parentYogaNode,
|
||||
int childIndex) {
|
||||
SystraceSection s("YogaLayoutableShadowNode::yogaNodeCloneCallbackConnector");
|
||||
|
||||
// At this point it is garanteed that all shadow nodes associated with yoga
|
||||
// nodes are `YogaLayoutableShadowNode` subclasses.
|
||||
|
@ -178,8 +175,6 @@ YGSize YogaLayoutableShadowNode::yogaNodeMeasureCallbackConnector(
|
|||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGMeasureMode heightMode) {
|
||||
SystraceSection s(
|
||||
"YogaLayoutableShadowNode::yogaNodeMeasureCallbackConnector");
|
||||
|
||||
auto shadowNodeRawPtr =
|
||||
static_cast<YogaLayoutableShadowNode *>(yogaNode->getContext());
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include <folly/dynamic.h>
|
||||
#include <jsi/JSIDynamic.h>
|
||||
#include <jsi/jsi.h>
|
||||
#include <react/debug/SystraceSection.h>
|
||||
|
||||
#include "RawEvent.h"
|
||||
|
||||
|
@ -65,8 +64,6 @@ void EventEmitter::dispatchEvent(
|
|||
const std::string &type,
|
||||
const ValueFactory &payloadFactory,
|
||||
const EventPriority &priority) const {
|
||||
SystraceSection s("EventEmitter::dispatchEvent");
|
||||
|
||||
auto eventDispatcher = eventDispatcher_.lock();
|
||||
if (!eventDispatcher) {
|
||||
return;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "Differentiator.h"
|
||||
|
||||
#include <react/core/LayoutableShadowNode.h>
|
||||
#include <react/debug/SystraceSection.h>
|
||||
#include "ShadowView.h"
|
||||
|
||||
namespace facebook {
|
||||
|
@ -215,8 +214,6 @@ static void calculateShadowViewMutations(
|
|||
ShadowViewMutationList calculateShadowViewMutations(
|
||||
const ShadowNode &oldRootShadowNode,
|
||||
const ShadowNode &newRootShadowNode) {
|
||||
SystraceSection s("calculateShadowViewMutations");
|
||||
|
||||
// Root shadow nodes must have same tag.
|
||||
assert(oldRootShadowNode.getTag() == newRootShadowNode.getTag());
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <jsi/jsi.h>
|
||||
|
||||
#include <react/core/LayoutContext.h>
|
||||
#include <react/debug/SystraceSection.h>
|
||||
#include <react/uimanager/ComponentDescriptorRegistry.h>
|
||||
#include <react/uimanager/UIManager.h>
|
||||
#include <react/uimanager/UIManagerBinding.h>
|
||||
|
@ -69,8 +68,6 @@ void Scheduler::startSurface(
|
|||
const folly::dynamic &initialProps,
|
||||
const LayoutConstraints &layoutConstraints,
|
||||
const LayoutContext &layoutContext) const {
|
||||
SystraceSection s("Scheduler::startSurface");
|
||||
|
||||
auto shadowTree =
|
||||
std::make_unique<ShadowTree>(surfaceId, layoutConstraints, layoutContext);
|
||||
shadowTree->setDelegate(this);
|
||||
|
@ -88,8 +85,6 @@ void Scheduler::startSurface(
|
|||
void Scheduler::renderTemplateToSurface(
|
||||
SurfaceId surfaceId,
|
||||
const std::string &uiTemplate) {
|
||||
SystraceSection s("Scheduler::renderTemplateToSurface");
|
||||
|
||||
try {
|
||||
if (uiTemplate.size() == 0) {
|
||||
return;
|
||||
|
@ -120,8 +115,6 @@ void Scheduler::renderTemplateToSurface(
|
|||
}
|
||||
|
||||
void Scheduler::stopSurface(SurfaceId surfaceId) const {
|
||||
SystraceSection s("Scheduler::stopSurface");
|
||||
|
||||
shadowTreeRegistry_.visit(surfaceId, [](const ShadowTree &shadowTree) {
|
||||
// As part of stopping the Surface, we have to commit an empty tree.
|
||||
return shadowTree.tryCommit(
|
||||
|
@ -147,8 +140,6 @@ Size Scheduler::measureSurface(
|
|||
SurfaceId surfaceId,
|
||||
const LayoutConstraints &layoutConstraints,
|
||||
const LayoutContext &layoutContext) const {
|
||||
SystraceSection s("Scheduler::measureSurface");
|
||||
|
||||
Size size;
|
||||
shadowTreeRegistry_.visit(surfaceId, [&](const ShadowTree &shadowTree) {
|
||||
shadowTree.tryCommit([&](const SharedRootShadowNode &oldRootShadowNode) {
|
||||
|
@ -166,8 +157,6 @@ void Scheduler::constraintSurfaceLayout(
|
|||
SurfaceId surfaceId,
|
||||
const LayoutConstraints &layoutConstraints,
|
||||
const LayoutContext &layoutContext) const {
|
||||
SystraceSection s("Scheduler::constraintSurfaceLayout");
|
||||
|
||||
shadowTreeRegistry_.visit(surfaceId, [&](const ShadowTree &shadowTree) {
|
||||
shadowTree.commit([&](const SharedRootShadowNode &oldRootShadowNode) {
|
||||
return oldRootShadowNode->clone(layoutConstraints, layoutContext);
|
||||
|
@ -190,8 +179,6 @@ SchedulerDelegate *Scheduler::getDelegate() const {
|
|||
void Scheduler::shadowTreeDidCommit(
|
||||
const ShadowTree &shadowTree,
|
||||
const ShadowViewMutationList &mutations) const {
|
||||
SystraceSection s("Scheduler::shadowTreeDidCommit");
|
||||
|
||||
if (delegate_) {
|
||||
delegate_->schedulerDidFinishTransaction(
|
||||
shadowTree.getSurfaceId(), mutations);
|
||||
|
@ -203,8 +190,6 @@ void Scheduler::shadowTreeDidCommit(
|
|||
void Scheduler::uiManagerDidFinishTransaction(
|
||||
SurfaceId surfaceId,
|
||||
const SharedShadowNodeUnsharedList &rootChildNodes) {
|
||||
SystraceSection s("Scheduler::uiManagerDidFinishTransaction");
|
||||
|
||||
shadowTreeRegistry_.visit(surfaceId, [&](const ShadowTree &shadowTree) {
|
||||
shadowTree.commit([&](const SharedRootShadowNode &oldRootShadowNode) {
|
||||
return std::make_shared<RootShadowNode>(
|
||||
|
@ -215,8 +200,6 @@ void Scheduler::uiManagerDidFinishTransaction(
|
|||
|
||||
void Scheduler::uiManagerDidCreateShadowNode(
|
||||
const SharedShadowNode &shadowNode) {
|
||||
SystraceSection s("Scheduler::uiManagerDidCreateShadowNode");
|
||||
|
||||
if (delegate_) {
|
||||
auto layoutableShadowNode =
|
||||
dynamic_cast<const LayoutableShadowNode *>(shadowNode.get());
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include <react/core/LayoutContext.h>
|
||||
#include <react/core/LayoutPrimitives.h>
|
||||
#include <react/debug/SystraceSection.h>
|
||||
#include <react/mounting/Differentiator.h>
|
||||
#include <react/mounting/ShadowViewMutation.h>
|
||||
|
||||
|
@ -111,8 +110,6 @@ Tag ShadowTree::getSurfaceId() const {
|
|||
|
||||
void ShadowTree::commit(ShadowTreeCommitTransaction transaction, int *revision)
|
||||
const {
|
||||
SystraceSection s("ShadowTree::commit");
|
||||
|
||||
int attempts = 0;
|
||||
|
||||
while (true) {
|
||||
|
@ -130,8 +127,6 @@ void ShadowTree::commit(ShadowTreeCommitTransaction transaction, int *revision)
|
|||
bool ShadowTree::tryCommit(
|
||||
ShadowTreeCommitTransaction transaction,
|
||||
int *revision) const {
|
||||
SystraceSection s("ShadowTree::tryCommit");
|
||||
|
||||
SharedRootShadowNode oldRootShadowNode;
|
||||
|
||||
{
|
||||
|
@ -188,8 +183,6 @@ bool ShadowTree::tryCommit(
|
|||
|
||||
void ShadowTree::emitLayoutEvents(
|
||||
const ShadowViewMutationList &mutations) const {
|
||||
SystraceSection s("ShadowTree::emitLayoutEvents");
|
||||
|
||||
for (const auto &mutation : mutations) {
|
||||
// Only `Insert` and `Update` mutations can affect layout metrics.
|
||||
if (mutation.type != ShadowViewMutation::Insert &&
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include "UIManager.h"
|
||||
|
||||
#include <react/core/ShadowNodeFragment.h>
|
||||
#include <react/debug/SystraceSection.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
@ -14,8 +13,6 @@ SharedShadowNode UIManager::createNode(
|
|||
SurfaceId surfaceId,
|
||||
const RawProps &rawProps,
|
||||
SharedEventTarget eventTarget) const {
|
||||
SystraceSection s("UIManager::createNode");
|
||||
|
||||
auto &componentDescriptor = componentDescriptorRegistry_->at(name);
|
||||
|
||||
auto shadowNode = componentDescriptor.createShadowNode(
|
||||
|
@ -36,8 +33,6 @@ SharedShadowNode UIManager::cloneNode(
|
|||
const SharedShadowNode &shadowNode,
|
||||
const SharedShadowNodeSharedList &children,
|
||||
const folly::Optional<RawProps> &rawProps) const {
|
||||
SystraceSection s("UIManager::cloneNode");
|
||||
|
||||
auto &componentDescriptor =
|
||||
componentDescriptorRegistry_->at(shadowNode->getComponentHandle());
|
||||
|
||||
|
@ -57,8 +52,6 @@ SharedShadowNode UIManager::cloneNode(
|
|||
void UIManager::appendChild(
|
||||
const SharedShadowNode &parentShadowNode,
|
||||
const SharedShadowNode &childShadowNode) const {
|
||||
SystraceSection s("UIManager::appendChild");
|
||||
|
||||
auto &componentDescriptor =
|
||||
componentDescriptorRegistry_->at(parentShadowNode->getComponentHandle());
|
||||
componentDescriptor.appendChild(parentShadowNode, childShadowNode);
|
||||
|
@ -67,8 +60,6 @@ void UIManager::appendChild(
|
|||
void UIManager::completeSurface(
|
||||
SurfaceId surfaceId,
|
||||
const SharedShadowNodeUnsharedList &rootChildren) const {
|
||||
SystraceSection s("UIManager::completeSurface");
|
||||
|
||||
if (delegate_) {
|
||||
delegate_->uiManagerDidFinishTransaction(surfaceId, rootChildren);
|
||||
}
|
||||
|
@ -77,8 +68,6 @@ void UIManager::completeSurface(
|
|||
void UIManager::setNativeProps(
|
||||
const SharedShadowNode &shadowNode,
|
||||
const RawProps &rawProps) const {
|
||||
SystraceSection s("UIManager::setNativeProps");
|
||||
|
||||
auto &componentDescriptor =
|
||||
componentDescriptorRegistry_->at(shadowNode->getComponentHandle());
|
||||
auto props = componentDescriptor.cloneProps(shadowNode->getProps(), rawProps);
|
||||
|
@ -96,8 +85,6 @@ void UIManager::setNativeProps(
|
|||
LayoutMetrics UIManager::getRelativeLayoutMetrics(
|
||||
const ShadowNode &shadowNode,
|
||||
const ShadowNode *ancestorShadowNode) const {
|
||||
SystraceSection s("UIManager::getRelativeLayoutMetrics");
|
||||
|
||||
if (!ancestorShadowNode) {
|
||||
shadowTreeRegistry_->visit(
|
||||
shadowNode.getRootTag(), [&](const ShadowTree &shadowTree) {
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
#include "UIManagerBinding.h"
|
||||
|
||||
#include <react/debug/SystraceSection.h>
|
||||
|
||||
#include <jsi/JSIDynamic.h>
|
||||
|
||||
namespace facebook {
|
||||
|
@ -68,8 +66,6 @@ void UIManagerBinding::dispatchEvent(
|
|||
const EventTarget *eventTarget,
|
||||
const std::string &type,
|
||||
const ValueFactory &payloadFactory) const {
|
||||
SystraceSection s("UIManagerBinding::dispatchEvent");
|
||||
|
||||
auto payload = payloadFactory(runtime);
|
||||
|
||||
auto instanceHandle = eventTarget
|
||||
|
|
Загрузка…
Ссылка в новой задаче