Commit 1cbbe64
fix(tracing): Guard getNewScreenTimeToDisplay behind enableTimeToInitialDisplay (#5849)
* fix(tracing): Guard getNewScreenTimeToDisplay behind enableTimeToInitialDisplay
NATIVE.getNewScreenTimeToDisplay() was called on every navigation state
change regardless of whether enableTimeToInitialDisplay was enabled.
This native bridge call posts to the main thread and registers a
Choreographer callback (Android) or CADisplayLink (iOS) to capture the
next frame timestamp.
On low-end devices (Fire TV, Chromecast) this is measurable overhead
that the user could not avoid even after setting
enableTimeToInitialDisplay: false.
The dispatch-time native calls (setActiveSpanId, navigationProcessingSpan)
were already correctly guarded behind the flag. This aligns the
state-change-time call with the same guard.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: Add changelog entry for navigation integration performance fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs(tracing): Add performance note to enableTimeToInitialDisplay JSDoc
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent c82db70 commit 1cbbe64
3 files changed
+23
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
9 | 16 | | |
10 | 17 | | |
11 | 18 | | |
| |||
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
25 | | - | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
| |||
438 | 441 | | |
439 | 442 | | |
440 | 443 | | |
441 | | - | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
442 | 447 | | |
443 | 448 | | |
444 | 449 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
588 | 598 | | |
589 | 599 | | |
590 | 600 | | |
| |||
0 commit comments