-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Performance timing API as default #17427
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
Conversation
@flamisz I think for that issue, based on a slack discussion, we were going to use the old API by default and switch to the new one only if the old one wasn't available to support older browsers that may not support the new API (eg, on mobile devices). |
@flamisz as suggested in #17259 (comment) wondering if it makes sense to prefer reading data from the older API and only fallback to the newer API if the older doesn't exist anymore for reasons mentioned in the comment and also in case eg some browsers now have not Additionally would need to check if Also to fully fix the issue need to add the rounding to integer values (see eg #17259 (comment) and #17259 (comment) as the newer API returns floats.). And we'd also need to check it eg with |
@tsteur and @diosmosis thanks for the review. I can make the old one default and round them integer (interestingly Firefox uses integer, but Chrome does not). I thought now we know what is the main issue, we'd like to use the new API because we talked about using the old one by default before @sgiehl found the problem, that's why I didn't change that part, but I'll do it now. |
The rounding was already solved in this PR #17372 |
build js |
1 similar comment
build js |
build js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work as expected now. Tested it in Chrome, Firefox and IE
@flamisz looks like the JS tests aren't passing (JSLint failing), can you take a look? Would be ready to merge afterwards. |
b075af4
to
56ac8be
Compare
jslint error:
|
@flamisz is it possible to disable jslint for that line? |
@diosmosis I can use
😄 |
build js |
@flamisz just had a thought, I'm not sure what valid values are acceptable for this code, but are |
btw could maybe just use |
@diosmosis it returns a
@tsteur I used the |
@tsteur can you look at this comment quickly: #17427 (comment) ? |
@diosmosis Might be good to test this in IE10 or so (seems pretty much the oldest browser that supports this API see https://caniuse.com/?search=performance ). Not sure if it could potentially result in an error if it wasn't defined etc. I think usually we'd maybe do |
Hi @flamisz, when you're able to can you take a look at #17427 (comment)? (making this comment since you weren't pinged in thomas' comment) |
build js |
@diosmosis and @tsteur I'm using |
Description:
fixes #17259
Review