Skip to content

Re-apply "Require the NativePerformance module and drop the legacy performance fallback" (#57609)#57609

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

Re-apply "Require the NativePerformance module and drop the legacy performance fallback" (#57609)#57609
rubennorte wants to merge 1 commit into
react:mainfrom
rubennorte:export-D112566045

Conversation

@rubennorte

@rubennorte rubennorte commented Jul 20, 2026

Copy link
Copy Markdown
Member

Summary:

This re-applies a previously landed change that was reverted. It requires the NativePerformance module and removes the legacy performance fallback path.

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 null checks and the getCurrentTimeStamp indirection (native now/timeOrigin are cached directly).
  • setUpPerformance is kept as a thin alias of the internal setup module so external callers keep working.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D112566045

@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 20, 2026
@meta-codesync

meta-codesync Bot commented Jul 20, 2026

Copy link
Copy Markdown

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

rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 20, 2026
…rformance fallback" (react#57609)

Summary:
Pull Request resolved: react#57609

This re-applies a previously landed change that was reverted. It requires the NativePerformance module and removes the legacy `performance` fallback path.

`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 null checks and the `getCurrentTimeStamp` indirection (native `now`/`timeOrigin` are cached directly).
- `setUpPerformance` is kept as a thin alias of the internal setup module so external callers keep working.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D112566045
@meta-codesync meta-codesync Bot changed the title Re-apply "Require the NativePerformance module and drop the legacy performance fallback" Re-apply "Require the NativePerformance module and drop the legacy performance fallback" (#57609) Jul 20, 2026
…rformance fallback" (react#57609)

Summary:
Pull Request resolved: react#57609

This re-applies a previously landed change that was reverted. It requires the NativePerformance module and removes the legacy `performance` fallback path.

`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 null checks and the `getCurrentTimeStamp` indirection (native `now`/`timeOrigin` are cached directly).
- `setUpPerformance` is kept as a thin alias of the internal setup module so external callers keep working.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D112566045
@meta-codesync meta-codesync Bot closed this in 11dc60c Jul 20, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Jul 20, 2026
@meta-codesync

meta-codesync Bot commented Jul 20, 2026

Copy link
Copy Markdown

This pull request has been merged in 11dc60c.

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