-
Notifications
You must be signed in to change notification settings - Fork 38
4.6 Integrate the processing model with Fetch #252
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
Comments
I'm seeing to ways to possible ways to go about this:
I'm currently leaning towards (2), but would love to run it by you first, @annevk and @yoavweiss. Note that the implementations look more like (1), where the network stack saves all the info internally in its own data structure until it's time to "mark". |
What do you mean with "at the end of the response"? When it's returned to the caller or when it reaches end-of-body? If the data structures are actually tightly coupled with a response I think it would be better to specify it that way. That also enables new types of APIs and seems like a more solid foundation than calling out to something. (It's also not immediately clear to me how that calling out would work across conceptual threads and such.) |
Yes, they're pretty tightly coupled. It's maybe better to save everything as a structure in fetch and pass it as a parameter to resource-timing when it's time to mark (as the implementations do anyway). |
Yeah, we have structs to be clear, see https://fetch.spec.whatwg.org/#fetch-params for an example. (Although I suspect here we'd store it on the response.) |
Looking closer, data structures are more tightly coupled with the request than with the response. For example, some metrics such as |
That makes sense and some of that duplication exists today as well. I don't have a good handle on when these things are exposed, but if they are not exposed before a response is exposed, I think we should end up exposing them on the response and use "fetch params" or maybe "request" as a place to do bookkeeping until there is a response. If they are exposed at some other point fetching might need new callbacks, but I hope that's not needed. |
OK, I'll put it as a field of |
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
When response is a network error or body is fully read, finalize and report the response. Depends on whatwg/fetch#1185 See: w3c/resource-timing#261 and w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
When response is a network error or body is fully read, finalize and report the response. Depends on whatwg/fetch#1185 See: w3c/resource-timing#261 and w3c/resource-timing#252
Created a "fetch timing info" struct to hold the bookkeeping necessary for resource timing. Populated it with some of the required values, leaving some of them for later patches as this is a big undertaking. See w3c/resource-timing#252
This defines the foundation for the PerformanceResourceTiming API and its properties. Note that the names used here are not a 1:1 match, e.g., post-redirect start time is fetchStart in the API. Note that Fetch doesn't decide when to create and enqueue PerformanceResourceTiming objects, but rather creates a data structure that holds the different time values, and it's up to the caller to invoke the newly-added finalize and report timing. Fetch also has a new callback, processResponseDone, for when the response errors or EOFs, which lets callers like the fetch() API invoke finalize and report timing at the right time. This change also makes fetch() adopt that. It's the first phase for addressing w3c/resource-timing#252, which contains a link to the other required steps to address Resource Timing/Navigation Timing/HTML/Fetch integration. Corresponding Resource Timing PR: w3c/resource-timing#261. (Once that lands there'll be a subsequent change to Fetch to resolve the remaining TODO.) Co-authored-by: Anne van Kesteren <[email protected]>
Will be closed by #261
Closed by whatwg/fetch#1185
Closed by whatwg/fetch#1185
Closed by whatwg/fetch#1185
Will be closed by #261
Closed by whatwg/fetch#1185
Closed by whatwg/fetch#1185
Closed by Closed by whatwg/fetch#1185
Closed by whatwg/fetch#1185
Closed by whatwg/fetch#1185
Closed by whatwg/fetch#1185
Closed by whatwg/fetch#1185
#238 still holds. The rest are closed by whatwg/fetch#1185
Closed by whatwg/fetch#1185 |
I believe this can be closed, and we can continue tracking whatwg/html#6542. |
LGTM |
When response is a network error or body is fully read, finalize and report the response. Depends on whatwg/fetch#1185 See: w3c/resource-timing#261 and w3c/resource-timing#252
When response is a network error or body is fully read, finalize and report the response. Depends on whatwg/fetch#1185. Also see w3c/resource-timing#261 and w3c/resource-timing#252.
When response is a network error or body is fully read, finalize and report the response. Depends on whatwg/fetch#1185. Also see w3c/resource-timing#261 and w3c/resource-timing#252.
Uh oh!
There was an error while loading. Please reload this page.
initiatorType
processing model needs to be defined in terms of Fetch #246name
needs to be more precise #244The text was updated successfully, but these errors were encountered: