-
-
Notifications
You must be signed in to change notification settings - Fork 360
fix(tracing): Guard getNewScreenTimeToDisplay behind enableTimeToInitialDisplay #5849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9bcf29c
38ca831
dd81064
9a5642a
4c4ae47
93ca90f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -117,6 +117,9 @@ interface ReactNavigationIntegrationOptions { | |
| * Time to initial display measures the time it takes from | ||
| * navigation dispatch to the render of the first frame of the new screen. | ||
| * | ||
| * Note: Enabling this adds native bridge calls on every navigation | ||
| * which may cause noticeable overhead on low-end devices. | ||
| * | ||
| * @default false | ||
| */ | ||
| enableTimeToInitialDisplay: boolean; | ||
|
|
@@ -438,7 +441,9 @@ export const reactNavigationIntegration = ({ | |
| return undefined; | ||
| } | ||
|
|
||
| addTimeToInitialDisplayFallback(latestNavigationSpan.spanContext().spanId, NATIVE.getNewScreenTimeToDisplay()); | ||
| if (enableTimeToInitialDisplay) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Q: should we mention the performance overhead when enabling this on changelog/docs?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added a note in the parameter documentation dd81064 |
||
| addTimeToInitialDisplayFallback(latestNavigationSpan.spanContext().spanId, NATIVE.getNewScreenTimeToDisplay()); | ||
| } | ||
|
|
||
| if (previousRoute?.key === route.key) { | ||
| debug.log(`[${INTEGRATION_NAME}] Navigation state changed, but route is the same as previous.`); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.