mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-27 03:08:06 +00:00
Document React's profiling build (#8054)
This commit is contained in:
committed by
GitHub
parent
11cb6b5915
commit
28e9bd9fa2
@@ -37,7 +37,7 @@ Wrap a component tree in a `<Profiler>` to measure its rendering performance.
|
||||
|
||||
#### Caveats {/*caveats*/}
|
||||
|
||||
* Profiling adds some additional overhead, so **it is disabled in the production build by default.** To opt into production profiling, you need to enable a [special production build with profiling enabled.](https://fb.me/react-profiling)
|
||||
* Profiling adds some additional overhead, so **it is disabled in the production build by default.** To opt into production profiling, you need to enable a [special production build with profiling enabled.](/reference/dev-tools/react-performance-tracks#using-profiling-builds)
|
||||
|
||||
---
|
||||
|
||||
@@ -81,7 +81,7 @@ It requires two props: an `id` (string) and an `onRender` callback (function) wh
|
||||
|
||||
<Pitfall>
|
||||
|
||||
Profiling adds some additional overhead, so **it is disabled in the production build by default.** To opt into production profiling, you need to enable a [special production build with profiling enabled.](https://fb.me/react-profiling)
|
||||
Profiling adds some additional overhead, so **it is disabled in the production build by default.** To opt into production profiling, you need to enable a [special production build with profiling enabled.](/reference/dev-tools/react-performance-tracks#using-profiling-builds)
|
||||
|
||||
</Pitfall>
|
||||
|
||||
@@ -89,6 +89,9 @@ Profiling adds some additional overhead, so **it is disabled in the production b
|
||||
|
||||
`<Profiler>` lets you gather measurements programmatically. If you're looking for an interactive profiler, try the Profiler tab in [React Developer Tools](/learn/react-developer-tools). It exposes similar functionality as a browser extension.
|
||||
|
||||
Components wrapped in `<Profiler>` will also be marked in the [Component tracks](/reference/dev-tools/react-performance-tracks#components) of React Performance tracks even in profiling builds.
|
||||
In development builds, all components are marked in the Components track regardless of whether they're wrapped in `<Profiler>`.
|
||||
|
||||
</Note>
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user