react-native-macos/Libraries/Performance
Rubén Norte 5efb4f09fd Remove (bad) implementation of the User Timing API from Systrace
Summary:
The `Systrace` module implements a polyfill for the User Timing API that's:
1. Incompatible with the Web standard. This polyfill expects `performance.mark` and `performance.measure` to be used exactly like `Systrace.beginEvent` and `Systrace.endEvent` respectively. If not used like those functions, they throw an error at runtime, which is really bad.
2. Never actually used. See below.

This polyfill is only installed if we're actually profiling on startup:
https://www.internalfb.com/code/fbsource/[4d888a933920]/xplat/js/react-native-github/Libraries/Core/setUpSystrace.js?lines=17-21

While the only code that we have that uses this API is actually not installed if we're profiling:

https://www.internalfb.com/code/fbsource/[4d888a933920]/xplat/js/react-native-github/Libraries/Core/setUpDeveloperTools.js?lines=20-21

This should be safe to remove then.

We have plans to add proper support for this API in the short term, so this also gets out of the way of doing that.

Additionally, installing this polyfill was the only reason why we had `setupSystrace`, so we can get rid of that too :)

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D39210813

fbshipit-source-id: a90b6237c311d2157069b41975d10b33f1f464ef
2022-09-08 11:12:06 -07:00
..
NativeJSCSamplingProfiler.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
PureComponentDebug.js Presuppress xplat and upgrade to 0.178.1 2022-05-26 12:59:52 -07:00
QuickPerformanceLogger.js Adding string annotations to markEvent 2022-01-27 04:47:33 -08:00
SamplingProfiler.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
Systrace.js Remove (bad) implementation of the User Timing API from Systrace 2022-09-08 11:12:06 -07:00