Skip to content
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

Enable cross-origin isolation to improve timing precision #233

Open
nolanlawson opened this issue Apr 25, 2022 · 1 comment · May be fixed by #234
Open

Enable cross-origin isolation to improve timing precision #233

nolanlawson opened this issue Apr 25, 2022 · 1 comment · May be fixed by #234

Comments

@nolanlawson
Copy link

By adding the HTTP headers to enable cross-origin isolation, it should be possible to get higher-precision timing from APIs like performance.now() and performance.mark()/measure(), at least in Chromium and Firefox.

This ought to help Tachometer provide more stable results. Also, since the Tachometer benchmark site doesn't pull in any cross-origin resources (AFAIK), it should be a non-breaking change.

@nolanlawson nolanlawson linked a pull request Apr 25, 2022 that will close this issue
@aomarks aomarks moved this to 📋 Triaged in Lit Project Board Jun 21, 2022
@nolanlawson
Copy link
Author

As a bonus, enabling cross-origin isolation also unlocks APIs like performance.measureUserAgentSpecificMemory and SharedArrayBuffer. I can't think of any existing use cases that would be broken by enabling it, either.

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 a pull request may close this issue.

1 participant