Commit 9bcf29c
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>1 parent 4ff35e2 commit 9bcf29c
2 files changed
Lines changed: 13 additions & 1 deletion
File tree
- packages/core
- src/js/tracing
- test/tracing
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
442 | 444 | | |
443 | 445 | | |
444 | 446 | | |
| |||
| 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