mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-02 06:45:02 +08:00
Add systrace to UIManagerModule.createConstants
Summary: - Differentiate when the constants are coming from lazy view managers or not - Add systrace sections to each reactpackage iteration for lazy view managers Differential Revision: D9664719 fbshipit-source-id: 3b8c6b3b40667a833471fcb957367501781b0f5d
This commit is contained in:
committed by
Facebook Github Bot
parent
1edeaef6ca
commit
cb6196073a
@@ -212,11 +212,14 @@ public class UIManagerModule extends ReactContextBaseJavaModule implements
|
||||
|
||||
private static Map<String, Object> createConstants(ViewManagerResolver viewManagerResolver) {
|
||||
ReactMarker.logMarker(CREATE_UI_MANAGER_MODULE_CONSTANTS_START);
|
||||
Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "CreateUIManagerConstants");
|
||||
SystraceMessage.beginSection(
|
||||
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "CreateUIManagerConstants")
|
||||
.arg("Lazy", true)
|
||||
.flush();
|
||||
try {
|
||||
return UIManagerModuleConstantsHelper.createConstants(viewManagerResolver);
|
||||
} finally {
|
||||
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
|
||||
SystraceMessage.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
|
||||
ReactMarker.logMarker(CREATE_UI_MANAGER_MODULE_CONSTANTS_END);
|
||||
}
|
||||
}
|
||||
@@ -226,12 +229,15 @@ public class UIManagerModule extends ReactContextBaseJavaModule implements
|
||||
@Nullable Map<String, Object> customBubblingEvents,
|
||||
@Nullable Map<String, Object> customDirectEvents) {
|
||||
ReactMarker.logMarker(CREATE_UI_MANAGER_MODULE_CONSTANTS_START);
|
||||
Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "CreateUIManagerConstants");
|
||||
SystraceMessage.beginSection(
|
||||
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "CreateUIManagerConstants")
|
||||
.arg("Lazy", false)
|
||||
.flush();
|
||||
try {
|
||||
return UIManagerModuleConstantsHelper.createConstants(
|
||||
viewManagers, customBubblingEvents, customDirectEvents);
|
||||
} finally {
|
||||
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
|
||||
SystraceMessage.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
|
||||
ReactMarker.logMarker(CREATE_UI_MANAGER_MODULE_CONSTANTS_END);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user