Expose the bridgeless performance logger and post RCTJavaScriptDidLoadNotification (#57083)#57083
Closed
fkgozali wants to merge 1 commit into
Closed
Expose the bridgeless performance logger and post RCTJavaScriptDidLoadNotification (#57083)#57083fkgozali wants to merge 1 commit into
fkgozali wants to merge 1 commit into
Conversation
|
@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
2befc88 to
c9a0987
Compare
|
This pull request has been merged in 9568de5. |
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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
In bridgeless mode,
RCTInstancerecords native startup timings in a per-instanceRCTPerformanceLogger, but that logger was never reachable from app code:RCTBridgeProxy.performanceLoggerreturned nil andRCTJavaScriptDidLoadNotificationwas never posted. Startup-perf consumers that follow the long-standing pattern of reading[bridge performanceLogger]onRCTJavaScriptDidLoadNotificationwere therefore silently inert under bridgeless, dropping all native startup timings.This restores that pattern for bridgeless:
RCTBridgeProxynow holds a realperformanceLoggerproperty, injected byRCTInstance, instead of returning nil.RCTInstancepostsRCTJavaScriptDidLoadNotification(on the main thread, with the bridge proxy inuserInfo[@"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
RCTBridgeProxyand postRCTJavaScriptDidLoadNotification, so native startup-perf consumers work in bridgelessReviewed By: christophpurrer
Differential Revision: D107542363