ITADN

Enable cross-origin isolation to improve timing precision

#233Opennolanlawson 创建于 2022-04-25
N
nolanlawsoncommented
By adding the HTTP headers to [enable cross-origin isolation](https://web.dev/cross-origin-isolation-guide/), it should be possible to get [higher-precision timing](https://developer.chrome.com/blog/cross-origin-isolated-hr-timers/) from APIs like `performance.now()` and `performance.mark()`/`measure()`, at least in Chromium and [Firefox](https://github.com/w3c/hr-time/pull/93#issuecomment-704337546). 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.
1 条评论