Skip to content

Conversation

@patrickhulce
Copy link
Collaborator

closes #5254


// QUIC network requests don't always "finish" even when they're done loading data
// Use receivedHeaders instead, see https://github.com/GoogleChrome/lighthouse/issues/5254
const isQUIC = record._responseHeaders && record._responseHeaders
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice pulled out into a function to separate determining if request is QUIC vs what to do with QUIC requests

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it could also be a function that's like isQuicAndFinished(record) to absorb logic below, too :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

// QUIC network requests don't always "finish" even when they're done loading data
// Use receivedHeaders instead, see https://github.com/GoogleChrome/lighthouse/issues/5254
const isQUIC = record._responseHeaders && record._responseHeaders
.find(header => header.name.toLowerCase() === 'alt-svc' && /quic/.test(header.value));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how certain is the 'alt-svc' check? Any other way to tell?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems to be fairly certain, in the spec it's not technically required to announce it buuuuuut...

While HTTP/QUIC doesn't formally require a client to implement Alt-Svc, there's no discovery mechanism other than Alt-Svc provided, so you're not going to get very far without
it.

from quicwg/base-drafts#253


let numInflightRequests = 0;
let quietPeriodStart = 0;
let quietPeriodStart = -Infinity;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the advantage of a [-Infinity, 0] period? Time starting at 0 also seems like a reasonable state of things

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's fine just made tests have [0, 0] quiet period so we either handle the empty period case, move test cases to past 0, or -Infinity, -Infinity seemed like most reasonable conceptually but I do not have strong feelings

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it may be fine, and I haven't spent enough time here recently to have a good gut instinct, but I think I would expect the earliest quiet period to start at 0.

I guess I don't understand what this is addressing. Seems independent of the QUIC change?

@brendankenny
Copy link
Contributor

brendankenny commented May 18, 2018

is this something we should also fix in the upstream NetworkManager so these are marked as finished? Or is it actually fixed and we just haven't updated our devtools frontend in so long...

@patrickhulce
Copy link
Collaborator Author

is this something we should also fix in the upstream NetworkManager so these are marked as finished? Or is it actually fixed and we just haven't updated our devtools frontend in so long...

DevTools frontend handles this case correctly, I didn't dive into the code there to see how since its ~2 years or so diff :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

H2/QUIC requests don't fire RequestFinished

3 participants