Skip to content

Conversation

@Lms24
Copy link
Member

@Lms24 Lms24 commented Jan 7, 2026

The performance.timeOrigin HighResTimestamp replaced performance.timing.navigationStart a while ago. I believe we can simplify our timeOrigin determination logic by fully decoupling both values. Previously, we'd only take timeOrigin if navigationStart was "more reliable" (less delta to Date.now()). Since timeOrigin has sub-millisecond precision, this leads to cases where we'd incorrectly take the older, less precise navigationStart entry, simply because timeOrigin had a couple of decimal numbers.

Not the end of the world, but this cleans up the code a bit and also reduces some bytes.

@Lms24 Lms24 changed the base branch from develop to lms/ref-core-optimize-timeOrigin January 7, 2026 10:29
@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.84 kB - -
@sentry/browser - with treeshaking flags 23.34 kB - -
@sentry/browser (incl. Tracing) 41.59 kB -0.04% -16 B 🔽
@sentry/browser (incl. Tracing, Profiling) 46.18 kB -0.04% -16 B 🔽
@sentry/browser (incl. Tracing, Replay) 80.16 kB -0.03% -18 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 69.9 kB -0.02% -13 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 84.84 kB -0.03% -19 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 97.1 kB -0.02% -14 B 🔽
@sentry/browser (incl. Feedback) 41.57 kB - -
@sentry/browser (incl. sendFeedback) 29.53 kB - -
@sentry/browser (incl. FeedbackAsync) 34.53 kB - -
@sentry/browser (incl. Metrics) 25.85 kB - -
@sentry/browser (incl. Logs) 26.07 kB - -
@sentry/browser (incl. Metrics & Logs) 26.82 kB - -
@sentry/react 26.58 kB - -
@sentry/react (incl. Tracing) 43.82 kB -0.04% -14 B 🔽
@sentry/vue 29.3 kB - -
@sentry/vue (incl. Tracing) 43.4 kB -0.04% -16 B 🔽
@sentry/svelte 24.86 kB - -
CDN Bundle 27.26 kB - -
CDN Bundle (incl. Tracing) 42.24 kB -0.04% -14 B 🔽
CDN Bundle (incl. Tracing, Replay) 78.94 kB -0.03% -16 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 84.42 kB -0.02% -14 B 🔽
CDN Bundle - uncompressed 80.02 kB - -
CDN Bundle (incl. Tracing) - uncompressed 125.4 kB -0.01% -10 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 241.94 kB -0.01% -10 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 254.73 kB -0.01% -10 B 🔽
@sentry/nextjs (client) 46.18 kB -0.04% -14 B 🔽
@sentry/sveltekit (client) 41.96 kB -0.04% -15 B 🔽
@sentry/node-core 51.7 kB +0.01% +4 B 🔺
@sentry/node 161.79 kB +0.01% +1 B 🔺
@sentry/node - without tracing 93.13 kB +0.01% +1 B 🔺
@sentry/aws-serverless 108.64 kB - -

View base workflow run

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 8,921 - 9,520 -6%
GET With Sentry 1,662 19% 1,766 -6%
GET With Sentry (error only) 6,280 70% 6,208 +1%
POST Baseline 1,196 - 1,177 +2%
POST With Sentry 599 50% 592 +1%
POST With Sentry (error only) 1,052 88% 1,062 -1%
MYSQL Baseline 3,282 - 3,378 -3%
MYSQL With Sentry 433 13% 462 -6%
MYSQL With Sentry (error only) 2,707 82% 2,746 -1%

View base workflow run

Base automatically changed from lms/ref-core-optimize-timeOrigin to develop January 7, 2026 13:27
@Lms24 Lms24 force-pushed the lms/ref-core-timeorigin-navigationstart-dependence branch from 74414ab to 18c4670 Compare January 7, 2026 13:34
@Lms24 Lms24 self-assigned this Jan 7, 2026
@Lms24 Lms24 marked this pull request as ready for review January 7, 2026 13:35
@Lms24 Lms24 requested review from logaretm and timfish January 7, 2026 13:43
@Lms24 Lms24 changed the title ref(core): Remove dependence between performance.timeorigin and performance.timing.navigationStart ref(core): Remove dependence between performance.timeOrigin and performance.timing.navigationStart Jan 7, 2026
@Lms24 Lms24 merged commit 107e2b0 into develop Jan 7, 2026
212 checks passed
@Lms24 Lms24 deleted the lms/ref-core-timeorigin-navigationstart-dependence branch January 7, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants