diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementationProvider.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementationProvider.java index 65b222408f..dd51fe3a32 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementationProvider.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementationProvider.java @@ -9,6 +9,7 @@ package com.facebook.react.uimanager; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.uimanager.events.EventDispatcher; +import com.facebook.systrace.Systrace; import java.util.List; /** Provides UIImplementation to use in {@link UIManagerModule}. */ @@ -20,11 +21,17 @@ public class UIImplementationProvider { UIManagerModule.ViewManagerResolver viewManagerResolver, EventDispatcher eventDispatcher, int minTimeLeftInFrameForNonBatchedOperationMs) { - return new UIImplementation( - reactContext, - viewManagerResolver, - eventDispatcher, - minTimeLeftInFrameForNonBatchedOperationMs); + Systrace.beginSection( + Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "UIImplementationProvider.createUIImplementation[1]"); + try { + return new UIImplementation( + reactContext, + viewManagerResolver, + eventDispatcher, + minTimeLeftInFrameForNonBatchedOperationMs); + } finally { + Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE); + } } public UIImplementation createUIImplementation( @@ -32,8 +39,17 @@ public class UIImplementationProvider { List viewManagerList, EventDispatcher eventDispatcher, int minTimeLeftInFrameForNonBatchedOperationMs) { - return new UIImplementation( - reactContext, viewManagerList, eventDispatcher, minTimeLeftInFrameForNonBatchedOperationMs); + Systrace.beginSection( + Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "UIImplementationProvider.createUIImplementation[2]"); + try { + return new UIImplementation( + reactContext, + viewManagerList, + eventDispatcher, + minTimeLeftInFrameForNonBatchedOperationMs); + } finally { + Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE); + } } UIImplementation createUIImplementation( @@ -41,10 +57,16 @@ public class UIImplementationProvider { ViewManagerRegistry viewManagerRegistry, EventDispatcher eventDispatcher, int minTimeLeftInFrameForNonBatchedOperationMs) { - return new UIImplementation( - reactContext, - viewManagerRegistry, - eventDispatcher, - minTimeLeftInFrameForNonBatchedOperationMs); + Systrace.beginSection( + Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "UIImplementationProvider.createUIImplementation[3]"); + try { + return new UIImplementation( + reactContext, + viewManagerRegistry, + eventDispatcher, + minTimeLeftInFrameForNonBatchedOperationMs); + } finally { + Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE); + } } }