You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -19,21 +19,15 @@ Experimental versions of React may contain bugs. Don't use them in production.
19
19
20
20
<Intro>
21
21
22
-
React Performance tracks are specialized custom entries that appear on the [Performance panel's timeline of Chrome DevTools](https://developer.chrome.com/docs/devtools/performance/overview).
22
+
React Performance Tracks are specialized custom entries that appear in the Performance panel's timeline.
23
23
24
24
</Intro>
25
25
26
-
These tracks are designed to provide developers with comprehensive insights into their React application's performance by visualizing React-specific events and metrics alongside other critical data sources such as Network requests, JavaScript execution, and Event Loop activity, all synchronized on a unified timeline within the Performance panel for a complete understanding of application behavior.
26
+
These tracks provide developers with comprehensive insights into their React application's performance. They visualize React-specific events and metrics alongside other critical data sources such as network requests, JavaScript execution, and Event Loop activity. All data is synchronized on a unified timeline within the Performance panel for a complete understanding of application behavior.
@@ -42,11 +36,11 @@ These tracks are designed to provide developers with comprehensive insights into
42
36
43
37
## Usage {/*usage*/}
44
38
45
-
You don't need to do anything to explicitly enable React Performance tracks. They are enabled by default in development and profiling builds of React and should appear by default in the traces you record with the Performance panel.
39
+
You don't need to do anything to explicitly enable React Performance Tracks. They are enabled by default in development and profiling builds of React and should appear automatically in the traces you record with the Performance panel of browsers that provide [extensibility APIs](https://developer.chrome.com/docs/devtools/performance/extension).
46
40
47
41
<Pitfall>
48
42
49
-
Profiling instrumentation that powers React Performance tracks adds some additional overhead, so it is disabled in the production build by default.
43
+
The profiling instrumentation that powers React Performance Tracks adds some additional overhead, so it is disabled in production builds by default.
50
44
51
45
</Pitfall>
52
46
@@ -56,8 +50,55 @@ Profiling instrumentation that powers React Performance tracks adds some additio
56
50
57
51
### Scheduler {/*scheduler*/}
58
52
59
-
🚧 Work in progress...
53
+
The Scheduler is an internal React concept used for managing tasks with different priorities. This track consists of 4 subtracks, each representing work of a specific priority:
54
+
55
+
-**Blocking** - The highest priority work that must be finished before the browser can paint.
56
+
-**Transition** - Non-blocking work that happens in the background, usually via [`startTransition`](/reference/react/startTransition).
57
+
-**Suspense** - Work related to Suspense boundaries, such as displaying fallbacks or revealing content.
58
+
-**Idle** - The lowest priority work that is done when there are no other tasks with higher priority.
59
+
60
+
🚧 `<screenshot>`
61
+
62
+
#### Updates {/*updates*/}
63
+
64
+
Every update consists of multiple phases that you can see on a timeline:
65
+
66
+
-**Render** - React renders the updated subtree by calling render functions of components. You can see the rendered components subtree on [Components track](/learn/react-performance-tracks#components), which follows the same color scheme.
67
+
-**Commit** - After rendering components, React will submit the changes to the DOM and run layout effects, like [`useLayoutEffect`](/reference/react/useLayoutEffect).
68
+
-**Remaining Effects** - React runs passive effects of a rendered subtree. This usually happens after the paint, and this is when React runs hooks like [`useEffect`](/reference/react/useEffect). One known exception is user interactions, like clicks, or other discrete events. In this scenario, this phase could run before the paint.
69
+
70
+
🚧 `<screenshot>`
71
+
72
+
[Learn more about renders and commits](/learn/render-and-commit).
60
73
61
74
### Components {/*components*/}
62
75
63
-
🚧 Work in progress...
76
+
The Components track visualizes the durations of React components. They are displayed as a flamegraph, where each entry represents the duration of the corresponding component render and all its descendant children components.
Similar to render durations, effect durations are also represented as a flamegraph, but with a different color scheme that aligns with the corresponding phase on the Scheduler track.
Additional events may be displayed during the render and effects phases:
91
+
92
+
- <span style={{padding: '0.125rem 0.25rem', backgroundColor: '#facc15', color: '#1f1f1fff'}}>Mount</span> - A corresponding subtree of component renders or effects was mounted.
93
+
- <span style={{padding: '0.125rem 0.25rem', backgroundColor: '#facc15', color: '#1f1f1fff'}}>Unmount</span> - A corresponding subtree of component renders or effects was unmounted.
94
+
- <span style={{padding: '0.125rem 0.25rem', backgroundColor: '#facc15', color: '#1f1f1fff'}}>Reconnect</span> - Similar to Mount, but limited to cases when [`<Activity>`](/reference/react/Activity) is used.
95
+
- <span style={{padding: '0.125rem 0.25rem', backgroundColor: '#facc15', color: '#1f1f1fff'}}>Disconnect</span> - Similar to Unmount, but limited to cases when [`<Activity>`](/reference/react/Activity) is used.
96
+
97
+
#### Changed props {/*changed-props*/}
98
+
99
+
In development builds, when you click on a component render entry, you can inspect potential changes in props. You can use this information to identify unnecessary renders.
0 commit comments