-
Notifications
You must be signed in to change notification settings - Fork 37
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
Specify the behaviors of requestStart and responseStart for Prefetch #360
Comments
Thanks for filing this issue! As you noticed, we've traditionally set events that happened before the timeOrigin as 0, and resisted the temptation of reporting negative times. I'd prefer to stick with that, unless there are strong arguments as to why when these timestamps happened in the past matters.
Wouldn't |
It seems to me there are basically two ways to reflect a prefetch request: Like a cache hit. In this view, the prefetch buffer looks similar to the HTTP cache. I would expect most of the timestamps (at least up to responseStart) to be zero or quite close to it. This means that it looks to unaware code like a request that was pretty fast. (This, to my mind, matches the user's subjective experience.) Like an uncached response which started before T=0. In this view, we're seeing the prefetch as a request which started before the navigation itself did (at a negative timestamp). This gives more visibility into the underlying timing of the actual events as they happened (though this visibility would be missing for responses cached in other ways anyhow), but may make the request seem slow (since prefetch requests may be initially low priority), especially if you compare events which are blocked by the user navigation (like I think my preference is the former, but I think at least one participant (I can't seem to find who in my notes, but I believe it was someone representing Akamai mPulse?) suggested the additional information of the latter approach would be helpful. Note that |
In Blink, the zero value of The attempt in crrev.com/c/4009904 was to follow the existing convention. |
For speculation-rule based prefetch, the resource-fetching occurs before the navigation, resulting in negative values for
requestStart
andresponseStart
(measured w.r.tstartTime
, see below).Exposing the negative values allows us the capture the full metrics; the down side is the potential security/privacy leak; and can skew existing measurements.
Alternatively we can set
requestStart
toconnectEnd
andresponseStart
torequestStart
. This way the order of the events are fully respected, resembling the events timeline of a navigation hitting a HTTP cache (no revalidation). However this way we lose some measurements.What do folks think?
P.s, I also think we should have the same negative behaviors for all the golden fields (
domainLookupStart
,domainLookupEnd
,connectStart
,secureConnectionStart
andconnectEnd
); but at least for Chromium they are all zeros, for not only prefetch but for normal navigation from the landing page to the designated URL. Is this expected?The text was updated successfully, but these errors were encountered: