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

Correct responseStart and similar timestamp for prefetches which blocked on head #46060

Merged
merged 1 commit into from
May 7, 2024

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented May 3, 2024

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}

…ked on head

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}
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit a67edef into master May 7, 2024
17 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-5502156 branch May 7, 2024 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants