react/scripts/rollup
Brian Vaughn 4ba20579da
Scheduling Profiler: De-emphasize React internal frames (#22588)
This commit adds code to all React bundles to explicitly register the beginning and ending of the module. This is done by creating Error objects (which capture the file name, line number, and column number) and passing them explicitly to a DevTools hook (when present).

Next, as the Scheduling Profiler logs metadata to the User Timing API, it prints these module ranges along with other metadata (like Lane values and profiler version number).

Lastly, the Scheduling Profiler UI compares stack frames to these ranges when drawing the flame graph and dims or de-emphasizes frames that fall within an internal module.

The net effect of this is that user code (and 3rd party code) stands out clearly in the flame graph while React internal modules are dimmed.

Internal module ranges are completely optional. Older profiling samples, or ones recorded without the React DevTools extension installed, will simply not dim the internal frames.
2021-10-21 14:40:41 -04:00
..
plugins Upgrade Closure Compiler (#19041) 2020-05-29 09:17:14 -07:00
shims Add concurrentRoot property to ReactNativeTypes (#21648) 2021-06-10 08:59:22 -04:00
validate Support disabling spurious act warnings with a global environment flag (#22561) 2021-10-18 08:27:26 -07:00
build-all-release-channels.js Improve DEV errors if string coercion throws (Temporal.*, Symbol, etc.) (#22064) 2021-09-27 10:05:07 -07:00
build.js Scheduling Profiler: De-emphasize React internal frames (#22588) 2021-10-21 14:40:41 -04:00
bundles.js Scheduling Profiler: De-emphasize React internal frames (#22588) 2021-10-21 14:40:41 -04:00
forks.js Remove unstable scheduler/tracing API (#20037) 2021-04-26 19:16:18 -04:00
modules.js Re-add old Fabric Offscreen impl behind flag (#22018) 2021-08-03 19:30:20 -07:00
packaging.js [Flight] Rename react-transport-... packages to react-server-... (#20403) 2020-12-08 08:08:57 -05:00
stats.js Fix sizebot (#15771) 2019-05-29 21:30:16 -07:00
sync.js Fork React Native renderer into FB and OSS bundles (#12625) 2018-04-18 13:16:50 -07:00
utils.js Fixed broken build script --unsafe-partial flag (#22324) 2021-09-15 13:32:09 -04:00
wrappers.js Scheduling Profiler: De-emphasize React internal frames (#22588) 2021-10-21 14:40:41 -04:00