Skip to content

Commit

Permalink
Instrumentation for SurfaceMountingManager
Browse files Browse the repository at this point in the history
Summary:
This diff adds a Systrace section to the `SurfaceMountingManager::createViewUnsafe` method.
This will allow us to see more detail within the `MountItemDispatcher::mountViews preMountItems` that was previously almost blank.
Changelog: [Internal]

Differential Revision: D62247235
  • Loading branch information
dmytrorykun authored and facebook-github-bot committed Sep 6, 2024
1 parent 5e77784 commit 56aba21
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.uimanager.ViewManagerRegistry;
import com.facebook.react.uimanager.events.EventCategoryDef;
import com.facebook.systrace.Systrace;
import java.util.ArrayDeque;
import java.util.HashSet;
import java.util.LinkedList;
Expand Down Expand Up @@ -659,6 +660,9 @@ public void createViewUnsafe(
@Nullable StateWrapper stateWrapper,
@Nullable EventEmitterWrapper eventEmitterWrapper,
boolean isLayoutable) {
Systrace.beginSection(
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE,
"SurfaceMountingManager::createViewUnsafe(" + componentName + ")");
ReactStylesDiffMap propMap = new ReactStylesDiffMap(props);

ViewState viewState = new ViewState(reactTag);
Expand All @@ -675,6 +679,7 @@ public void createViewUnsafe(
reactTag, mThemedReactContext, propMap, stateWrapper, mJSResponderHandler);
viewState.mViewManager = viewManager;
}
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
}

public void updateProps(int reactTag, ReadableMap props) {
Expand Down

0 comments on commit 56aba21

Please sign in to comment.