mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Refactor logging of Fabric React Markers when running on the UI Thread
Summary: This diff refactors the execution of the logging of Fabric React markers to be executed after the MountItems are executed on the UI Thred Changelog: Improve logging of Fabric react markers Reviewed By: JoshuaGross Differential Revision: D18010920 fbshipit-source-id: e36306102d190119a89c16e660b855acab1528fe
This commit is contained in:
committed by
Facebook Github Bot
parent
c5321e8514
commit
a8ce2dcf89
@@ -474,10 +474,14 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
|
||||
mMountItems.add(mountItem);
|
||||
}
|
||||
|
||||
// Post markers outside of lock
|
||||
if (UiThreadUtil.isOnUiThread()) {
|
||||
dispatchMountItems();
|
||||
}
|
||||
|
||||
// Post markers outside of lock and after sync mounting finishes its execution
|
||||
if (isBatchMountItem) {
|
||||
ReactMarker.logFabricMarker(
|
||||
ReactMarkerConstants.FABRIC_COMMIT_START, null, commitNumber, mCommitStartTime);
|
||||
ReactMarkerConstants.FABRIC_COMMIT_START, null, commitNumber, commitStartTime);
|
||||
ReactMarker.logFabricMarker(
|
||||
ReactMarkerConstants.FABRIC_FINISH_TRANSACTION_START,
|
||||
null,
|
||||
@@ -498,10 +502,6 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
|
||||
ReactMarkerConstants.FABRIC_LAYOUT_END, null, commitNumber, layoutEndTime);
|
||||
ReactMarker.logFabricMarker(ReactMarkerConstants.FABRIC_COMMIT_END, null, commitNumber);
|
||||
}
|
||||
|
||||
if (UiThreadUtil.isOnUiThread()) {
|
||||
dispatchMountItems();
|
||||
}
|
||||
}
|
||||
|
||||
@UiThread
|
||||
|
||||
Reference in New Issue
Block a user