-
Notifications
You must be signed in to change notification settings - Fork 131
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
Editorial: Refactor for auto-reporting timing from fetch #347
Conversation
Depends on whatwg/fetch#1413 This clarifies that a resource timing entry is always for a fetch and not for a request or response.
conclude
instead of finalize
when fetchingThere 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.
This needs updating to align with the revised approach.
Fixed |
So the result here is that for synchronous XMLHttpRequest we don't create a timing entry, right? |
No, there is no behavioral change. In sync XHR the task that reports the timing would run on the parallel queue, but that's immaterial because the main-thread queue is waiting on it anyway. |
I think there's two problems and they might also have been present with the previous text (though in a different way):
Perhaps sync XHR needs to invoke "report timing steps" itself? |
Sure, that would be an easy solution. I'll revise the fetch spec to only report if not in a parallel queue |
Fixed in whatwg/fetch@9f0745a and Report timing for sync XHR |
As long as fetch callers pass in the necessary data through the request concept, they will not have to make additional calls to get timing reported accurately. Note that this does not work if callers want to use useParallelQueue. Downstream PRs: * whatwg/html#7722 * whatwg/xhr#347 * w3c/csswg-drafts#7355 * w3c/beacon#75 * w3c/resource-timing#321 * https://github.com/w3c/navigation-timing/pull/1760 Closes #1208 and closes w3c/navigation-timing#131.
@annevk: I believe this is now ready for a re-review as it links to the corrected fetch. |
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.
Looks good modulo one phrasing suggestion.
xhr.bs
Outdated
@@ -960,14 +962,13 @@ return <a>this</a>'s <a>cross-origin credentials</a>. | |||
<li><p>If <var>processedResponse</var> is false, then set <a>this</a>'s <a>timed out flag</a> and | |||
<a for="fetch controller">terminate</a> <a>this</a>'s <a for=XMLHttpRequest>fetch controller</a>. | |||
|
|||
<li><p>Call <a>this</a>'s <a for=XMLHttpRequest>fetch controller</a>'s | |||
<a for="fetch controller">report timing</a> given the <a>current global object</a>. |
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.
This would be a bit more conventional as "Report timing for this's fetch controller given the current global object".
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.
I'll push a fixup commit.
Depends on whatwg/fetch#1413
This clarifies that a resource timing entry is always for a
fetch and not for a request or response.
Preview | Diff