Correct responseStart and similar timestamp for prefetches which blocked on head #46060
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In early revisions, prefetches could not be served until the response
head had arrived, and any navigation before that time would not wait for
the prefetch but issue a new request. Consequently, it sufficed to allow
these values to duplicate the previous timestamp, since these always
logically occur before navigation.
Since Chromium's PerformanceResourceTiming and
PerformanceNavigationTiming implementations do this automatically in the
absence of valid timestamps, this was accomplished by preventing load
timing information from being included with a prefetched response.
Instead, we should pass along the essential timestamps for computing
typical metrics, but simply adjust those that occur before fetchStart to
occur at the same time as it, as though they had completed
instantaneously (since, from the perspective of the user experience,
it's as though they had).
A feature param is included to allow effectively reverting to the old
behavior in case of emergency.
See this doc for more info:
https://docs.google.com/document/d/1oESLkgpXysbl_FQMZ5Ahj3xtHW6d_UTcB-StJrS7a1U/edit
Bug: 337199386,1382255
Change-Id: I8cdde8465f87c4893780c835222bfd303b05dfc1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5502156
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: William Liu <liuwilliam@chromium.org>
Reviewed-by: Adithya Srinivasan <adithyas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1297011}