Skip to content

Expose the bridgeless performance logger and post RCTJavaScriptDidLoadNotification (#57083)#57083

Closed
fkgozali wants to merge 1 commit into
facebook:mainfrom
fkgozali:export-D107542363
Closed

Expose the bridgeless performance logger and post RCTJavaScriptDidLoadNotification (#57083)#57083
fkgozali wants to merge 1 commit into
facebook:mainfrom
fkgozali:export-D107542363

Conversation

@fkgozali
Copy link
Copy Markdown
Contributor

@fkgozali fkgozali commented Jun 4, 2026

Summary:

In bridgeless mode, RCTInstance records native startup timings in a per-instance RCTPerformanceLogger, but that logger was never reachable from app code: RCTBridgeProxy.performanceLogger returned nil and RCTJavaScriptDidLoadNotification was never posted. Startup-perf consumers that follow the long-standing pattern of reading [bridge performanceLogger] on RCTJavaScriptDidLoadNotification were therefore silently inert under bridgeless, dropping all native startup timings.

This restores that pattern for bridgeless:

  • RCTBridgeProxy now holds a real performanceLogger property, injected by RCTInstance, instead of returning nil.
  • RCTInstance posts RCTJavaScriptDidLoadNotification (on the main thread, with the bridge proxy in userInfo[@"bridge"]) once the JS bundle has loaded, mirroring the legacy bridge.

No change to the legacy bridge path.

Changelog:
[iOS][Fixed] - Expose the bridgeless performance logger via RCTBridgeProxy and post RCTJavaScriptDidLoadNotification, so native startup-perf consumers work in bridgeless

Reviewed By: christophpurrer

Differential Revision: D107542363

@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 Jun 4, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Jun 4, 2026

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

…dNotification (facebook#57083)

Summary:

In bridgeless mode, `RCTInstance` records native startup timings in a per-instance `RCTPerformanceLogger`, but that logger was never reachable from app code: `RCTBridgeProxy.performanceLogger` returned nil and `RCTJavaScriptDidLoadNotification` was never posted. Startup-perf consumers that follow the long-standing pattern of reading `[bridge performanceLogger]` on `RCTJavaScriptDidLoadNotification` were therefore silently inert under bridgeless, dropping all native startup timings.

This restores that pattern for bridgeless:
- `RCTBridgeProxy` now holds a real `performanceLogger` property, injected by `RCTInstance`, instead of returning nil.
- `RCTInstance` posts `RCTJavaScriptDidLoadNotification` (on the main thread, with the bridge proxy in `userInfo[@"bridge"]`) once the JS bundle has loaded, mirroring the legacy bridge.

No change to the legacy bridge path.

Changelog:
[iOS][Fixed] - Expose the bridgeless performance logger via `RCTBridgeProxy` and post `RCTJavaScriptDidLoadNotification`, so native startup-perf consumers work in bridgeless

Reviewed By: christophpurrer

Differential Revision: D107542363
@meta-codesync meta-codesync Bot changed the title Expose the bridgeless performance logger and post RCTJavaScriptDidLoadNotification Expose the bridgeless performance logger and post RCTJavaScriptDidLoadNotification (#57083) Jun 4, 2026
@fkgozali fkgozali force-pushed the export-D107542363 branch from 2befc88 to c9a0987 Compare June 4, 2026 22:25
@meta-codesync meta-codesync Bot closed this in 9568de5 Jun 5, 2026
@facebook-github-tools facebook-github-tools Bot added the Merged This PR has been merged. label Jun 5, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Jun 5, 2026

This pull request has been merged in 9568de5.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @fkgozali in 9568de5

When will my fix make it into a release? | How to file a pick request?

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.

2 participants