commit | f6fbd565237a74628a99e3efd27f821f0081785e | [log] [tgz] |
---|---|---|
author | kenoss <kenoss@chromium.org> | Wed Sep 04 00:40:28 2024 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Sep 04 00:40:28 2024 |
tree | 772900e72266c4c2443a4f96c685ebd7f573502d | |
parent | 47d178c2fbb3f5af4a47f8cc3eff956b32dc1c26 [diff] |
Prefetch: Rewrite "wait matching prefetch" loop (Part 5) This CL introduces a feature flag `kPrefetchNewWaitLoop` and replaces `PrefetchService::GetPrefetchToServe()` by `PrefetchMatchResolver2::FindPrefetch()`. doc: https://docs.google.com/document/d/1i9gXNKiq2l-BEVbBU9UuY6R03KnKsKRLAmJgXD2ZPyk Intended side effects: - Replaces UMA `PrefetchProxy.AfterClick.BlockUntilHeadDuration.{WasServed}. {SpeculationEagerness}` with `PrefetchProxy.AfterClick.BlockUntilHeadDuration2.{WasServed}.{SpeculationEagerness}`. Before this CL, it is recorded duration from BlockUntilHead for prior navigation (e.g. prerender). The latter records blocked duration as intended. - Replaces UMA `PrefetchProxy.AfterClick.WasBlockedUntilHeadWhenServing.{SpeculationEagerness}` with `PrefetchProxy.AfterClick.PrefetchMatchingBlockedNavigationWithPrefetch.{SpeculationEagerness}`. The differences for edge cases are unknown. This is mainly for safe replacement. Other behaviors are preserved as much as possible. Note that the UMA `PrefetchProxy.AfterClick.RedirectChainSize` is unchanged as the condition of the callsite `PrefetchContainer::OnReturnPrefetchToServe(true)` is same to the one of `PrefetchContainer::NotifyServeResult(/*is_served=*/true)`. Note that `PreloadingAttempt.AccurateTriggering` is unchanged while it's changed on unit tests. Because it works as the following: 1. Changed case in unit tests is that prefetch received non-redirect header and is `kServable` state. 2. In this case and with old path, `PreloadingDataImpl::DidStartNavigation()` calls `PreloadingAttemptImpl::SetIsAccurateTriggering()`. At this timing, `PrefetchService::MatchUrl()` can return the correct value as we assumed 1. 3. So, the behavior is unchanged. This CL disables some tests for BlockUntilHead as they depends on the old code path. We will add similar tests for new path in the next CL. Fixed: 353489607 Bug: 343867153 Change-Id: Id32a9fdf161e97f7e608945a62a882f48b080a68 Unresolved-Comment-Reason: Leave discussion about metrics to refer in the future. It's OK now. Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5670092 Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Commit-Queue: Ken Okada <kenoss@chromium.org> Auto-Submit: Ken Okada <kenoss@chromium.org> Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org> Cr-Commit-Position: refs/heads/main@{#1350517}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.