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

Add a network request phase for "response waiting to be processed" #1349

Open
mstange opened this issue Oct 10, 2018 · 8 comments
Open

Add a network request phase for "response waiting to be processed" #1349

mstange opened this issue Oct 10, 2018 · 8 comments
Labels
feature Work that is user facing, and typically should be planned through https://airtable.com/shrRydo6UXheb network panel Related to the networking panel

Comments

@mstange
Copy link
Contributor

mstange commented Oct 10, 2018

cc zoepage digitarald

Compare the two network tracks in this profile: https://perfht.ml/2EejwGq

The network track in the content process looks a lot busier, even though it's listing the same requests. What happens is that we draw the boxes until the event for the completion of the request has been processed on the main thread. The main thread in the content process is a lot busier than the main thread in the parent process, so network request completion waits longer until it's being acknowledged in the main thread, and that results in longer boxes.

For a specific load that shows the difference between the two processes, compare load 53 (timeline.2.1.0.js) in each process's network chart tab.

I think it would be good to make this waiting time explicit in the network chart and in the timing details pane for a request. It's similar to the "Waiting" and "Blocked" phases, but it happens later - it happens after the full response has been received. So I don't know what to call it.

┆Issue is synchronized with this Jira Task

@zoepage
Copy link
Contributor

zoepage commented Oct 10, 2018

Related to #1339 as we want to display the idle time in the queued topic.
(correct @digitarald ?)

@mstange
Copy link
Contributor Author

mstange commented Oct 10, 2018

Is this time what's called "queued"? Or is "queued" something else? I thought queued happened before the request is sent out over the network, not after the response has been received.

@past
Copy link
Contributor

past commented Oct 10, 2018

There has been a related discussion in the web-perf WG. Perhaps we could use "stalled" for this latter delay to distinguish it from "queued" which would occur earlier in the load.

@zoepage
Copy link
Contributor

zoepage commented Oct 10, 2018

As far as I understand "queued" is the duration of everything until the request starts, so e.g. domainLookup, but I don't know if this is correct?

// edit
So, having display of HAR timing would be also helpful here?

@mstange
Copy link
Contributor Author

mstange commented Oct 10, 2018

It seems like the word "stalled" is already used with a different meaning (waiting to start the request due to TCP connection limit), as per the text in w3c/resource-timing#169. The discussion in w3c/resource-timing#164 doesn't mention any phase after responseEnd, as far as I can see. But the phase that I'm talking about occurs after responseEnd.

@mstange
Copy link
Contributor Author

mstange commented Oct 10, 2018

"Target busy", "Target blocked" might be ok names.

@digitarald
Copy link
Contributor

Maybe a good mapping is to apply the same wording to request and response. This way we are not trying to give special meaning to various meanings of queued, stalled, etc.

Request Queue Time: Time from request being created to necko handling it (depends on connection limits, priorities, piping and busy main thready event queue).
Response Queue Time: Time from full response received in Necko to main thread starting to handle the response (depends on busy main thread event queue).

Not covered here is the JS aspect of load event handler delay for XHRs (or maybe even image decoding?):
Response Handler Delay: Time from main thread done handling a response to the JS event handler being called (depends on busy content process event queue)

How do these assumptions and conclusions sound?

@julienw julienw added feature Work that is user facing, and typically should be planned through https://airtable.com/shrRydo6UXheb network panel Related to the networking panel labels Oct 12, 2018
@mstange
Copy link
Contributor Author

mstange commented Oct 12, 2018

When you say "main thread", are you referring to the main thread of the parent process or the main thread of the content process?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Work that is user facing, and typically should be planned through https://airtable.com/shrRydo6UXheb network panel Related to the networking panel
Projects
None yet
Development

No branches or pull requests

5 participants