New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 654166 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Feature



Sign in to add a comment

Fetch resources in order of likelihood of use

Project Member Reported by twif...@chromium.org, Oct 8 2016

Issue description

Currently resources are prefetched in order of:
1. Each manifest is fetched in descending order of visits
2. All resources are fetched per manifest in descending order of weight

But if the prefetch reaches a byte cap, then we may have downloaded less important resources. Instead, we should order by:

P(resource will be used) = P(host will be visited) * P(resource will be used | host is visited)

This would allow us to optimize our utilization metrics better, and will also have a compound effect on our upcoming feedback feature, allowing other sites to "bubble up" if one site has no useful resources.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/528a15b56652173bd822ea2a1123e6960ba4f255

commit 528a15b56652173bd822ea2a1123e6960ba4f255
Author: twifkak <twifkak@chromium.org>
Date: Thu Oct 20 00:22:04 2016

Precache: Optionally rank resources-to-precache globally.

Added a new global_ranking varation param to the experiment, default false. If
specified, the client will multiply each resource weight (a value [0,1]) from
the PrecacheManifest by the number of visits to that host -- the result being
an estimated likelihood of using that resource. The resources will then be
fetched in decreasing order of likelihood.

This allows hosts with vastly more visits to fetch more resources than hosts
with vastly fewer visits. It also allows mostly-useless resources to bubble
down and be replaced by resources for additional hosts.

In addition, added a couple new fields to PrecacheConfigurationSettings to
tweak its behavior:
- total_resources_count is a cap on the total number of resource URLs to fetch
- min_weight is a threshold on the minimum likelihood

In addition, a few things changed in behavior:
- manifests are fetched first, before any resources
- the PercentCompleted UMA is measured in % of resource URLs complete rather
  than % of manifests complete
- resource ordering is preserved across pause/resume

BUG= 654166 

Review-Url: https://chromiumcodereview.appspot.com/2403193002
Cr-Commit-Position: refs/heads/master@{#426350}

[modify] https://crrev.com/528a15b56652173bd822ea2a1123e6960ba4f255/components/precache/content/precache_manager.cc
[modify] https://crrev.com/528a15b56652173bd822ea2a1123e6960ba4f255/components/precache/core/precache_fetcher.cc
[modify] https://crrev.com/528a15b56652173bd822ea2a1123e6960ba4f255/components/precache/core/precache_fetcher.h
[modify] https://crrev.com/528a15b56652173bd822ea2a1123e6960ba4f255/components/precache/core/precache_fetcher_unittest.cc
[modify] https://crrev.com/528a15b56652173bd822ea2a1123e6960ba4f255/components/precache/core/proto/precache.proto
[modify] https://crrev.com/528a15b56652173bd822ea2a1123e6960ba4f255/components/precache/core/proto/unfinished_work.proto

Labels: Merge-Request-55

Comment 3 by dimu@chromium.org, Oct 20 2016

Labels: -Merge-Request-55 Merge-Approved-55 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M55 (branch: 2883)
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 20 2016

Labels: -merge-approved-55 merge-merged-2883
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/04fc59a0ca84731499f804d2c3aa9fafe4132e06

commit 04fc59a0ca84731499f804d2c3aa9fafe4132e06
Author: Devin Mullins <twifkak@google.com>
Date: Thu Oct 20 01:51:32 2016

Precache: Optionally rank resources-to-precache globally.

Added a new global_ranking varation param to the experiment, default false. If
specified, the client will multiply each resource weight (a value [0,1]) from
the PrecacheManifest by the number of visits to that host -- the result being
an estimated likelihood of using that resource. The resources will then be
fetched in decreasing order of likelihood.

This allows hosts with vastly more visits to fetch more resources than hosts
with vastly fewer visits. It also allows mostly-useless resources to bubble
down and be replaced by resources for additional hosts.

In addition, added a couple new fields to PrecacheConfigurationSettings to
tweak its behavior:
- total_resources_count is a cap on the total number of resource URLs to fetch
- min_weight is a threshold on the minimum likelihood

In addition, a few things changed in behavior:
- manifests are fetched first, before any resources
- the PercentCompleted UMA is measured in % of resource URLs complete rather
  than % of manifests complete
- resource ordering is preserved across pause/resume

BUG= 654166 

Review-Url: https://chromiumcodereview.appspot.com/2403193002
Cr-Commit-Position: refs/heads/master@{#426350}
(cherry picked from commit 528a15b56652173bd822ea2a1123e6960ba4f255)

Review URL: https://codereview.chromium.org/2438613005 .

Cr-Commit-Position: refs/branch-heads/2883@{#204}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/04fc59a0ca84731499f804d2c3aa9fafe4132e06/components/precache/content/precache_manager.cc
[modify] https://crrev.com/04fc59a0ca84731499f804d2c3aa9fafe4132e06/components/precache/core/precache_fetcher.cc
[modify] https://crrev.com/04fc59a0ca84731499f804d2c3aa9fafe4132e06/components/precache/core/precache_fetcher.h
[modify] https://crrev.com/04fc59a0ca84731499f804d2c3aa9fafe4132e06/components/precache/core/precache_fetcher_unittest.cc
[modify] https://crrev.com/04fc59a0ca84731499f804d2c3aa9fafe4132e06/components/precache/core/proto/precache.proto
[modify] https://crrev.com/04fc59a0ca84731499f804d2c3aa9fafe4132e06/components/precache/core/proto/unfinished_work.proto

Status: Fixed (was: Started)
Project Member

Comment 6 by bugdroid1@chromium.org, Oct 27 2016

Labels: merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/04fc59a0ca84731499f804d2c3aa9fafe4132e06

commit 04fc59a0ca84731499f804d2c3aa9fafe4132e06
Author: Devin Mullins <twifkak@google.com>
Date: Thu Oct 20 01:51:32 2016

Precache: Optionally rank resources-to-precache globally.

Added a new global_ranking varation param to the experiment, default false. If
specified, the client will multiply each resource weight (a value [0,1]) from
the PrecacheManifest by the number of visits to that host -- the result being
an estimated likelihood of using that resource. The resources will then be
fetched in decreasing order of likelihood.

This allows hosts with vastly more visits to fetch more resources than hosts
with vastly fewer visits. It also allows mostly-useless resources to bubble
down and be replaced by resources for additional hosts.

In addition, added a couple new fields to PrecacheConfigurationSettings to
tweak its behavior:
- total_resources_count is a cap on the total number of resource URLs to fetch
- min_weight is a threshold on the minimum likelihood

In addition, a few things changed in behavior:
- manifests are fetched first, before any resources
- the PercentCompleted UMA is measured in % of resource URLs complete rather
  than % of manifests complete
- resource ordering is preserved across pause/resume

BUG= 654166 

Review-Url: https://chromiumcodereview.appspot.com/2403193002
Cr-Commit-Position: refs/heads/master@{#426350}
(cherry picked from commit 528a15b56652173bd822ea2a1123e6960ba4f255)

Review URL: https://codereview.chromium.org/2438613005 .

Cr-Commit-Position: refs/branch-heads/2883@{#204}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/04fc59a0ca84731499f804d2c3aa9fafe4132e06/components/precache/content/precache_manager.cc
[modify] https://crrev.com/04fc59a0ca84731499f804d2c3aa9fafe4132e06/components/precache/core/precache_fetcher.cc
[modify] https://crrev.com/04fc59a0ca84731499f804d2c3aa9fafe4132e06/components/precache/core/precache_fetcher.h
[modify] https://crrev.com/04fc59a0ca84731499f804d2c3aa9fafe4132e06/components/precache/core/precache_fetcher_unittest.cc
[modify] https://crrev.com/04fc59a0ca84731499f804d2c3aa9fafe4132e06/components/precache/core/proto/precache.proto
[modify] https://crrev.com/04fc59a0ca84731499f804d2c3aa9fafe4132e06/components/precache/core/proto/unfinished_work.proto

Comment 7 by dimu@google.com, Nov 4 2016

[Automated comment] removing mislabelled merge-merged-2840

Comment 8 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840
Project Member

Comment 9 by bugdroid1@chromium.org, Jan 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2bc003a0eadbd4062770b206fa76311f55d0c54e

commit 2bc003a0eadbd4062770b206fa76311f55d0c54e
Author: twifkak <twifkak@chromium.org>
Date: Mon Jan 09 21:23:20 2017

Add Precache global ranking config to test list.

BUG= 654166 

Review-Url: https://codereview.chromium.org/2567033004
Cr-Commit-Position: refs/heads/master@{#442349}

[modify] https://crrev.com/2bc003a0eadbd4062770b206fa76311f55d0c54e/testing/variations/fieldtrial_testing_config.json

Sign in to add a comment