mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Make TTRC markers consistent between Bridge and Bridgeless
Summary: The purpose of this change is to make TTRC markers work similarly for bridge loading and bridgeless loading so we could compare performance between them. There are mainly four cases involved: ```REACT_BRIDGE_LOADING_START, REACT_BRIDGE_LOADING_END, REACT_BRIDGELESS_LOADING_START, REACT_BRIDGELESS_LOADING_END ``` First 2 are for beginning/ending of bridge loading which includes creating fragment, loading JS bundle, running JS bundle and creating react instance. Last 2 are for similar purpose with bridgeless. Changelog: [Internal] Reviewed By: lunaleaps Differential Revision: D26514499 fbshipit-source-id: 65d6f3cc7de9e07a7a3a802dd77138e74c23aa5b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c6d7af60fa
commit
abf079abb8
@@ -1002,6 +1002,9 @@ public class ReactInstanceManager {
|
||||
private void runCreateReactContextOnNewThread(final ReactContextInitParams initParams) {
|
||||
FLog.d(ReactConstants.TAG, "ReactInstanceManager.runCreateReactContextOnNewThread()");
|
||||
UiThreadUtil.assertOnUiThread();
|
||||
|
||||
// Mark start of bridge loading
|
||||
ReactMarker.logMarker(ReactMarkerConstants.REACT_BRIDGE_LOADING_START);
|
||||
synchronized (mAttachedReactRoots) {
|
||||
synchronized (mReactContextLock) {
|
||||
if (mCurrentReactContext != null) {
|
||||
@@ -1133,6 +1136,8 @@ public class ReactInstanceManager {
|
||||
});
|
||||
Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);
|
||||
ReactMarker.logMarker(SETUP_REACT_CONTEXT_END);
|
||||
// Mark end of bridge loading
|
||||
ReactMarker.logMarker(ReactMarkerConstants.REACT_BRIDGE_LOADING_END);
|
||||
reactContext.runOnJSQueueThread(
|
||||
new Runnable() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user