mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-13 09:20:50 +08:00
Add a marker to indicate when JS thread priority is lowered
Summary: When RN starts up, it lowers the default priority of the JS thread. This diff sets a point to see when the JS thread priority is lowered. In subsequent diffs, we will be able to use this marker to play around with bumping the priority of the JS thread till TTI is done. Reviewed By: alexeylang Differential Revision: D8965457 fbshipit-source-id: 87cb1e3d3b370af183f388c411fd9a87a6cba250
This commit is contained in:
committed by
Facebook Github Bot
parent
1850906e5e
commit
d4aef08af9
@@ -25,6 +25,7 @@ import static com.facebook.react.bridge.ReactMarkerConstants.REACT_CONTEXT_THREA
|
||||
import static com.facebook.react.bridge.ReactMarkerConstants.REACT_CONTEXT_THREAD_START;
|
||||
import static com.facebook.react.bridge.ReactMarkerConstants.SETUP_REACT_CONTEXT_END;
|
||||
import static com.facebook.react.bridge.ReactMarkerConstants.SETUP_REACT_CONTEXT_START;
|
||||
import static com.facebook.react.bridge.ReactMarkerConstants.CHANGE_THREAD_PRIORITY;
|
||||
import static com.facebook.react.bridge.ReactMarkerConstants.VM_INIT;
|
||||
import static com.facebook.react.uimanager.common.UIManagerType.FABRIC;
|
||||
import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_APPS;
|
||||
@@ -1024,6 +1025,7 @@ public class ReactInstanceManager {
|
||||
@Override
|
||||
public void run() {
|
||||
Process.setThreadPriority(Process.THREAD_PRIORITY_DEFAULT);
|
||||
ReactMarker.logMarker(CHANGE_THREAD_PRIORITY, "js_default");
|
||||
}
|
||||
});
|
||||
reactContext.runOnNativeModulesQueueThread(
|
||||
|
||||
@@ -25,6 +25,7 @@ public enum ReactMarkerConstants {
|
||||
NATIVE_MODULE_INITIALIZE_END,
|
||||
SETUP_REACT_CONTEXT_START,
|
||||
SETUP_REACT_CONTEXT_END,
|
||||
CHANGE_THREAD_PRIORITY,
|
||||
CREATE_UI_MANAGER_MODULE_START,
|
||||
CREATE_UI_MANAGER_MODULE_END,
|
||||
CREATE_VIEW_MANAGERS_START,
|
||||
|
||||
Reference in New Issue
Block a user