Skip to content

Require the NativePerformance module and drop the legacy performance fallback (#57566)#57566

Closed
rubennorte wants to merge 1 commit into
react:mainfrom
rubennorte:export-D112116429
Closed

Require the NativePerformance module and drop the legacy performance fallback (#57566)#57566
rubennorte wants to merge 1 commit into
react:mainfrom
rubennorte:export-D112116429

Conversation

@rubennorte

@rubennorte rubennorte commented Jul 15, 2026

Copy link
Copy Markdown
Member

Summary:

setUpPerformance previously branched between the modern Performance API setup and a barebones performance stub depending on whether the native Performance module was available. The native module is now always present in supported runtimes, so this consolidates everything on the modern setup and removes the dead fallback path.

  • NativePerformance is now resolved via getEnforcing instead of a nullable get, and its timeOrigin method is no longer optional (the native module always implements it).
  • Removed the legacy performance stub and the global.nativePerformanceNow fallbacks, along with the now-redundant nullthrows/null checks and the getCurrentTimeStamp indirection (native now/timeOrigin are cached directly).
  • Libraries/Core/setUpPerformance is kept as a thin alias of the internal setup module so external callers importing it keep working; the internal module was renamed from setUpPerformanceModern to setUpPerformance.

Changelog: [Internal]

Reviewed By: hoxyq, cipolleschi

Differential Revision: D112116429

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 15, 2026
@meta-codesync

meta-codesync Bot commented Jul 15, 2026

Copy link
Copy Markdown

@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D112116429.

rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 15, 2026
…fallback (react#57566)

Summary:
Pull Request resolved: react#57566

`setUpPerformance` previously branched between the modern Performance API setup and a barebones `performance` stub depending on whether the native Performance module was available. The native module is now always present in supported runtimes, so this consolidates everything on the modern setup and removes the dead fallback path.

- `NativePerformance` is now resolved via `getEnforcing` instead of a nullable `get`, and its `timeOrigin` method is no longer optional (the native module always implements it).
- Removed the legacy `performance` stub and the `global.nativePerformanceNow` fallbacks, along with the now-redundant `nullthrows`/null checks and the `getCurrentTimeStamp` indirection (native `now`/`timeOrigin` are cached directly).
- `Libraries/Core/setUpPerformance` is kept as a thin alias of the internal setup module so external callers importing it keep working; the internal module was renamed from `setUpPerformanceModern` to `setUpPerformance`.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D112116429
@meta-codesync meta-codesync Bot changed the title Require the NativePerformance module and drop the legacy performance fallback Require the NativePerformance module and drop the legacy performance fallback (#57566) Jul 15, 2026
@meta-codesync meta-codesync Bot changed the title Require the NativePerformance module and drop the legacy performance fallback (#57566) Require the NativePerformance module and drop the legacy performance fallback Jul 15, 2026
rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 15, 2026
…fallback (react#57566)

Summary:
Pull Request resolved: react#57566

`setUpPerformance` previously branched between the modern Performance API setup and a barebones `performance` stub depending on whether the native Performance module was available. The native module is now always present in supported runtimes, so this consolidates everything on the modern setup and removes the dead fallback path.

- `NativePerformance` is now resolved via `getEnforcing` instead of a nullable `get`, and its `timeOrigin` method is no longer optional (the native module always implements it).
- Removed the legacy `performance` stub and the `global.nativePerformanceNow` fallbacks, along with the now-redundant `nullthrows`/null checks and the `getCurrentTimeStamp` indirection (native `now`/`timeOrigin` are cached directly).
- `Libraries/Core/setUpPerformance` is kept as a thin alias of the internal setup module so external callers importing it keep working; the internal module was renamed from `setUpPerformanceModern` to `setUpPerformance`.

Changelog: [Internal]

Reviewed By: hoxyq, cipolleschi

Differential Revision: D112116429
@meta-codesync meta-codesync Bot changed the title Require the NativePerformance module and drop the legacy performance fallback Require the NativePerformance module and drop the legacy performance fallback (#57566) Jul 15, 2026
rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 15, 2026
…fallback (react#57566)

Summary:
Pull Request resolved: react#57566

`setUpPerformance` previously branched between the modern Performance API setup and a barebones `performance` stub depending on whether the native Performance module was available. The native module is now always present in supported runtimes, so this consolidates everything on the modern setup and removes the dead fallback path.

- `NativePerformance` is now resolved via `getEnforcing` instead of a nullable `get`, and its `timeOrigin` method is no longer optional (the native module always implements it).
- Removed the legacy `performance` stub and the `global.nativePerformanceNow` fallbacks, along with the now-redundant `nullthrows`/null checks and the `getCurrentTimeStamp` indirection (native `now`/`timeOrigin` are cached directly).
- `Libraries/Core/setUpPerformance` is kept as a thin alias of the internal setup module so external callers importing it keep working; the internal module was renamed from `setUpPerformanceModern` to `setUpPerformance`.

Changelog: [Internal]

Reviewed By: hoxyq, cipolleschi

Differential Revision: D112116429
rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 16, 2026
…fallback (react#57566)

Summary:
Pull Request resolved: react#57566

`setUpPerformance` previously branched between the modern Performance API setup and a barebones `performance` stub depending on whether the native Performance module was available. The native module is now always present in supported runtimes, so this consolidates everything on the modern setup and removes the dead fallback path.

- `NativePerformance` is now resolved via `getEnforcing` instead of a nullable `get`, and its `timeOrigin` method is no longer optional (the native module always implements it).
- Removed the legacy `performance` stub and the `global.nativePerformanceNow` fallbacks, along with the now-redundant `nullthrows`/null checks and the `getCurrentTimeStamp` indirection (native `now`/`timeOrigin` are cached directly).
- `Libraries/Core/setUpPerformance` is kept as a thin alias of the internal setup module so external callers importing it keep working; the internal module was renamed from `setUpPerformanceModern` to `setUpPerformance`.

Changelog: [Internal]

Reviewed By: hoxyq, cipolleschi

Differential Revision: D112116429
rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 16, 2026
…fallback (react#57566)

Summary:
Pull Request resolved: react#57566

`setUpPerformance` previously branched between the modern Performance API setup and a barebones `performance` stub depending on whether the native Performance module was available. The native module is now always present in supported runtimes, so this consolidates everything on the modern setup and removes the dead fallback path.

- `NativePerformance` is now resolved via `getEnforcing` instead of a nullable `get`, and its `timeOrigin` method is no longer optional (the native module always implements it).
- Removed the legacy `performance` stub and the `global.nativePerformanceNow` fallbacks, along with the now-redundant `nullthrows`/null checks and the `getCurrentTimeStamp` indirection (native `now`/`timeOrigin` are cached directly).
- `Libraries/Core/setUpPerformance` is kept as a thin alias of the internal setup module so external callers importing it keep working; the internal module was renamed from `setUpPerformanceModern` to `setUpPerformance`.

Changelog: [Internal]

Reviewed By: hoxyq, cipolleschi

Differential Revision: D112116429
rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 16, 2026
…fallback (react#57566)

Summary:
Pull Request resolved: react#57566

`setUpPerformance` previously branched between the modern Performance API setup and a barebones `performance` stub depending on whether the native Performance module was available. The native module is now always present in supported runtimes, so this consolidates everything on the modern setup and removes the dead fallback path.

- `NativePerformance` is now resolved via `getEnforcing` instead of a nullable `get`, and its `timeOrigin` method is no longer optional (the native module always implements it).
- Removed the legacy `performance` stub and the `global.nativePerformanceNow` fallbacks, along with the now-redundant `nullthrows`/null checks and the `getCurrentTimeStamp` indirection (native `now`/`timeOrigin` are cached directly).
- `Libraries/Core/setUpPerformance` is kept as a thin alias of the internal setup module so external callers importing it keep working; the internal module was renamed from `setUpPerformanceModern` to `setUpPerformance`.

Changelog: [Internal]

Reviewed By: hoxyq, cipolleschi

Differential Revision: D112116429
…fallback (react#57566)

Summary:
Pull Request resolved: react#57566

`setUpPerformance` previously branched between the modern Performance API setup and a barebones `performance` stub depending on whether the native Performance module was available. The native module is now always present in supported runtimes, so this consolidates everything on the modern setup and removes the dead fallback path.

- `NativePerformance` is now resolved via `getEnforcing` instead of a nullable `get`, and its `timeOrigin` method is no longer optional (the native module always implements it).
- Removed the legacy `performance` stub and the `global.nativePerformanceNow` fallbacks, along with the now-redundant `nullthrows`/null checks and the `getCurrentTimeStamp` indirection (native `now`/`timeOrigin` are cached directly).
- `Libraries/Core/setUpPerformance` is kept as a thin alias of the internal setup module so external callers importing it keep working; the internal module was renamed from `setUpPerformanceModern` to `setUpPerformance`.

Changelog: [Internal]

Reviewed By: hoxyq, cipolleschi

Differential Revision: D112116429
@meta-codesync meta-codesync Bot closed this in afc1651 Jul 16, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Jul 16, 2026
@meta-codesync

meta-codesync Bot commented Jul 16, 2026

Copy link
Copy Markdown

This pull request has been merged in afc1651.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant