New issue
Advanced search Search tips

Issue 631966 link

Starred by 5 users

Issue metadata

Status: Assigned
Owner:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug


Sign in to add a comment

Revisit and improve resource_prefetch_predictor

Project Member Reported by lizeb@chromium.org, Jul 27 2016

Issue description

Tracking bug for investigations and improvements of the speculative prefetch predictor.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 27 2016

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

commit c9c483d3058976b76c1c5b4deb3047db140d89cf
Author: lizeb <lizeb@chromium.org>
Date: Wed Jul 27 15:55:56 2016

predictors: Remove the HTTP restriction for speculative prefetch.

The prefetcher skips the HTTPS main pages and subresources, which is
unfortunate as more and more pages and resources are served over HTTPS.

Example from loading the verge with this patch, (from
prefetch_predictor_tool.py) on Android:

https://cdn0.vox-cdn.com/stylesheets/verge2_all.v7ffc13f1b68c7dbd.css
https://cdn0.vox-cdn.com/javascripts/libraries.vc262b07aa2474684.js
https://cdn0.vox-cdn.com/javascripts/lib/advertisement.v6fdc11c.js
https://optimize-stats.voxmedia.com/loader.min.js?key=efd28c71b5699c36
https://cdn0.vox-cdn.com/javascripts/verge2_head.v43436e3cdcad9833.js
http://ad-cdn.technoratimedia.com/smartwrapper/81065/1027/sw.min.js
https://www.googletagservices.com/tag/js/gpt.js
https://cdn0.vox-cdn.com/javascripts/verge2_body.v9f33e9e87ec93cd8.js

Without:

http://ad-cdn.technoratimedia.com/smartwrapper/81065/1027/sw.min.js
http://partner.googleadservices.com/gpt/pubads_impl_92.js
http://cdn.yldbt.com/js/yieldbot.intent.js
http://ads.rubiconproject.com/header/7470.js
http://sbnationbidder-d.openx.net/w/1.0/jstag?nc=172968584-theverge1
http://cdn.krxd.net/ctjs/controltag.js.726d287890a4d2c520d4a7a450e210ea
http://www.google-analytics.com/analytics.js
http://pagead2.googlesyndication.com/pagead/osd.js

BUG=631966

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

[modify] https://crrev.com/c9c483d3058976b76c1c5b4deb3047db140d89cf/chrome/browser/predictors/resource_prefetch_predictor.cc

Comment 2 by lizeb@chromium.org, Jul 28 2016

Blocking: 629424

Comment 3 by lizeb@chromium.org, Jul 28 2016

Blocking: -629424

Comment 4 by lizeb@chromium.org, Jul 28 2016

Blockedon: 629424
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 2 2016

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

commit 6e3614acd196b31a68c1f1f1a90804379cae57d1
Author: lizeb <lizeb@chromium.org>
Date: Tue Aug 02 13:38:18 2016

predictors: Add the request priority to the resource_prefetch_predictor DB.

Request priority is derived from the priority given by Blink. This makes
it an important criteria for prioritizing requests in prefetch.
This CL stores the request priority in the local database. A forthcoming
one will use it for prioritization.

BUG=631966

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

[modify] https://crrev.com/6e3614acd196b31a68c1f1f1a90804379cae57d1/chrome/browser/net/resource_prefetch_predictor_observer.cc
[modify] https://crrev.com/6e3614acd196b31a68c1f1f1a90804379cae57d1/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/6e3614acd196b31a68c1f1f1a90804379cae57d1/chrome/browser/predictors/resource_prefetch_predictor.h
[modify] https://crrev.com/6e3614acd196b31a68c1f1f1a90804379cae57d1/chrome/browser/predictors/resource_prefetch_predictor_tables.cc
[modify] https://crrev.com/6e3614acd196b31a68c1f1f1a90804379cae57d1/chrome/browser/predictors/resource_prefetch_predictor_tables.h
[modify] https://crrev.com/6e3614acd196b31a68c1f1f1a90804379cae57d1/chrome/browser/predictors/resource_prefetch_predictor_tables_unittest.cc
[modify] https://crrev.com/6e3614acd196b31a68c1f1f1a90804379cae57d1/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
[modify] https://crrev.com/6e3614acd196b31a68c1f1f1a90804379cae57d1/tools/resource_prefetch_predictor/prefetch_predictor_tool.py

Project Member

Comment 8 by bugdroid1@chromium.org, Aug 17 2016

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

commit 135b7336c5c7f1e38a88c0b89b762d335208cd6f
Author: lizeb <lizeb@chromium.org>
Date: Wed Aug 17 11:18:28 2016

predictors: Fix duplicate content type detection.

Content type mapping is done in two places: in
ResourcePrefetchPredictor, and in ResourcePrefetchPredictorObserver. The
first one is undesirable, since it overrides the resource type set at
URL request time.
Remove the duplication, and move the summary creation to
ResourcePrefetchPredictor. This will make it easier to add tests as
well.

BUG=631966

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

[modify] https://crrev.com/135b7336c5c7f1e38a88c0b89b762d335208cd6f/chrome/browser/net/resource_prefetch_predictor_observer.cc
[modify] https://crrev.com/135b7336c5c7f1e38a88c0b89b762d335208cd6f/chrome/browser/predictors/resource_prefetch_common.cc
[modify] https://crrev.com/135b7336c5c7f1e38a88c0b89b762d335208cd6f/chrome/browser/predictors/resource_prefetch_common.h
[modify] https://crrev.com/135b7336c5c7f1e38a88c0b89b762d335208cd6f/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/135b7336c5c7f1e38a88c0b89b762d335208cd6f/chrome/browser/predictors/resource_prefetch_predictor.h
[modify] https://crrev.com/135b7336c5c7f1e38a88c0b89b762d335208cd6f/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
[modify] https://crrev.com/135b7336c5c7f1e38a88c0b89b762d335208cd6f/chrome/browser/predictors/resource_prefetcher_unittest.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Aug 17 2016

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

commit c3833fe89053051ead372b0bd129e0794507c2e7
Author: lizeb <lizeb@chromium.org>
Date: Wed Aug 17 13:51:48 2016

predictors: Add tests to ResourcePrefetchPredictor.

BUG=631966

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

[modify] https://crrev.com/c3833fe89053051ead372b0bd129e0794507c2e7/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Aug 19 2016

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

commit c65a3bf951519f90b6be30a1bded64a7001e59d0
Author: lizeb <lizeb@chromium.org>
Date: Fri Aug 19 19:03:45 2016

predictors: Track whether resources have validators, and require validation.

This adds to the database whether resources have validators, and are
never fresh because they require revalidation each time. This will be
used later to adjust the priority.

Also adds tests for SummarizeResponse, and unifies (and fixes) the
content type handling in it.

BUG=631966

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

[modify] https://crrev.com/c65a3bf951519f90b6be30a1bded64a7001e59d0/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/c65a3bf951519f90b6be30a1bded64a7001e59d0/chrome/browser/predictors/resource_prefetch_predictor.h
[modify] https://crrev.com/c65a3bf951519f90b6be30a1bded64a7001e59d0/chrome/browser/predictors/resource_prefetch_predictor_tables.cc
[modify] https://crrev.com/c65a3bf951519f90b6be30a1bded64a7001e59d0/chrome/browser/predictors/resource_prefetch_predictor_tables.h
[modify] https://crrev.com/c65a3bf951519f90b6be30a1bded64a7001e59d0/chrome/browser/predictors/resource_prefetch_predictor_tables_unittest.cc
[modify] https://crrev.com/c65a3bf951519f90b6be30a1bded64a7001e59d0/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
[modify] https://crrev.com/c65a3bf951519f90b6be30a1bded64a7001e59d0/tools/resource_prefetch_predictor/prefetch_predictor_tool.py

Project Member

Comment 11 by bugdroid1@chromium.org, Aug 23 2016

Project Member

Comment 14 by bugdroid1@chromium.org, Sep 2 2016

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

commit 997952d9496f57bdc4434d515a50770dd5735715
Author: lizeb <lizeb@chromium.org>
Date: Fri Sep 02 11:03:13 2016

predictors: Remove unused histograms for speculative_prefetch_predictor.

These histograms will no longer be accurate and prevent code
refactoring and improvements.

Also fixes the presubmit check: cannot assume that the first element of
sys.path is '.', and tools/python doesn't contain __init__.py.

BUG=631966

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

[modify] https://crrev.com/997952d9496f57bdc4434d515a50770dd5735715/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/997952d9496f57bdc4434d515a50770dd5735715/chrome/browser/predictors/resource_prefetch_predictor.h
[modify] https://crrev.com/997952d9496f57bdc4434d515a50770dd5735715/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
[modify] https://crrev.com/997952d9496f57bdc4434d515a50770dd5735715/tools/metrics/common/presubmit_util.py
[modify] https://crrev.com/997952d9496f57bdc4434d515a50770dd5735715/tools/metrics/histograms/histograms.xml

Comment 16 by lizeb@chromium.org, Sep 26 2016

Blockedon: 650246

Comment 17 by lizeb@chromium.org, Sep 26 2016

Blockedon: 650250

Comment 18 by lizeb@chromium.org, Sep 26 2016

Blockedon: 650253
Project Member

Comment 19 by bugdroid1@chromium.org, Sep 26 2016

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

commit 72fec99e143cd8fa697e04ad32bc6be4dc9c6c8e
Author: lizeb <lizeb@chromium.org>
Date: Mon Sep 26 16:04:55 2016

predictors: Key the resource prefetcher by URL, not navigation.

The resource prefetcher is currently keyed by navigation. It is now
keyed by URL, which is the only piece of data used from the
navigation. Aside from less coupling, this opens the door to trigger
prefetches before a navigation starts.

This commit also removes the possibility of having two concurrent
prefetches running for the same host. Aside from being rare, this is not
desirable as a lot of resources are expected to be shared across two
URLs on the same domain. Thus, a prefetch B can unintentionally use a
resource prefetched by a prefetch A from the same domain, negating the
prefetch (since LOAD_PREFETCH resources can only be used once without
revalidation).

BUG=631966

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

[modify] https://crrev.com/72fec99e143cd8fa697e04ad32bc6be4dc9c6c8e/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/72fec99e143cd8fa697e04ad32bc6be4dc9c6c8e/chrome/browser/predictors/resource_prefetcher.cc
[modify] https://crrev.com/72fec99e143cd8fa697e04ad32bc6be4dc9c6c8e/chrome/browser/predictors/resource_prefetcher.h
[modify] https://crrev.com/72fec99e143cd8fa697e04ad32bc6be4dc9c6c8e/chrome/browser/predictors/resource_prefetcher_manager.cc
[modify] https://crrev.com/72fec99e143cd8fa697e04ad32bc6be4dc9c6c8e/chrome/browser/predictors/resource_prefetcher_manager.h
[modify] https://crrev.com/72fec99e143cd8fa697e04ad32bc6be4dc9c6c8e/chrome/browser/predictors/resource_prefetcher_unittest.cc

Project Member

Comment 20 by bugdroid1@chromium.org, Sep 26 2016

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

commit 68ebcad9d6ab7491ee1f2f5c5a28e7eac1c4987f
Author: alexilin <alexilin@chromium.org>
Date: Mon Sep 26 18:16:15 2016

Refactor the resource_prefetch_predictor.

This removes ResourceRow object and uses proto message ResourceData instead of
it. It allows to get rid of the boilerplate conversion from the DB to an
internal structure.

Plus adds lost ResourceData::RESOURCE_TYPE_FONT_RESOURCE case in
chrome/browser/ui/webui/predictors/predictors_handler.cc

BUG=631966

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

[modify] https://crrev.com/68ebcad9d6ab7491ee1f2f5c5a28e7eac1c4987f/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/68ebcad9d6ab7491ee1f2f5c5a28e7eac1c4987f/chrome/browser/predictors/resource_prefetch_predictor.h
[modify] https://crrev.com/68ebcad9d6ab7491ee1f2f5c5a28e7eac1c4987f/chrome/browser/predictors/resource_prefetch_predictor_tables.cc
[modify] https://crrev.com/68ebcad9d6ab7491ee1f2f5c5a28e7eac1c4987f/chrome/browser/predictors/resource_prefetch_predictor_tables.h
[modify] https://crrev.com/68ebcad9d6ab7491ee1f2f5c5a28e7eac1c4987f/chrome/browser/predictors/resource_prefetch_predictor_tables_unittest.cc
[add] https://crrev.com/68ebcad9d6ab7491ee1f2f5c5a28e7eac1c4987f/chrome/browser/predictors/resource_prefetch_predictor_test_util.cc
[add] https://crrev.com/68ebcad9d6ab7491ee1f2f5c5a28e7eac1c4987f/chrome/browser/predictors/resource_prefetch_predictor_test_util.h
[modify] https://crrev.com/68ebcad9d6ab7491ee1f2f5c5a28e7eac1c4987f/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
[modify] https://crrev.com/68ebcad9d6ab7491ee1f2f5c5a28e7eac1c4987f/chrome/browser/ui/webui/predictors/predictors_handler.cc
[modify] https://crrev.com/68ebcad9d6ab7491ee1f2f5c5a28e7eac1c4987f/chrome/test/BUILD.gn

Project Member

Comment 21 by bugdroid1@chromium.org, Sep 28 2016

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

commit 43b2f02a9eb2bc50e849d6120caa1de84abcbe46
Author: alexilin <alexilin@chromium.org>
Date: Wed Sep 28 15:00:08 2016

Redirect handling in the resource_prefetch_predictor.

Collect and save information about enpoints in redirect chains that
prefetch predictor can start to prefetch subresources before it reaches
last redirect hop.

Information about redirects is stored in the database keyed by url (or host)
of first hop in redirect chain. One row (RedirectData proto message)
contains collection of all previously seen urls (or hosts) appearing
as endpoints of redirect chain (RedirectStat proto message).

This CL depends on https://codereview.chromium.org/2357593002

BUG=631966

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

[modify] https://crrev.com/43b2f02a9eb2bc50e849d6120caa1de84abcbe46/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/43b2f02a9eb2bc50e849d6120caa1de84abcbe46/chrome/browser/predictors/resource_prefetch_predictor.h
[modify] https://crrev.com/43b2f02a9eb2bc50e849d6120caa1de84abcbe46/chrome/browser/predictors/resource_prefetch_predictor.proto
[modify] https://crrev.com/43b2f02a9eb2bc50e849d6120caa1de84abcbe46/chrome/browser/predictors/resource_prefetch_predictor_tables.cc
[modify] https://crrev.com/43b2f02a9eb2bc50e849d6120caa1de84abcbe46/chrome/browser/predictors/resource_prefetch_predictor_tables.h
[modify] https://crrev.com/43b2f02a9eb2bc50e849d6120caa1de84abcbe46/chrome/browser/predictors/resource_prefetch_predictor_tables_unittest.cc
[modify] https://crrev.com/43b2f02a9eb2bc50e849d6120caa1de84abcbe46/chrome/browser/predictors/resource_prefetch_predictor_test_util.cc
[modify] https://crrev.com/43b2f02a9eb2bc50e849d6120caa1de84abcbe46/chrome/browser/predictors/resource_prefetch_predictor_test_util.h
[modify] https://crrev.com/43b2f02a9eb2bc50e849d6120caa1de84abcbe46/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc

Project Member

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

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

commit 3eb631ab216ff9ea0302a9e89efe33003b11d935
Author: lizeb <lizeb@chromium.org>
Date: Tue Oct 04 11:21:21 2016

predictors: Take the priority into account for scoring resources.

This changes the way the resource score is computed in the
resource_prefetch_predictor. It takes into account the request priority
as the most important feature, then resource type, then average position.

The rationale is that resource priority surfaces the render-blocking
resources, that are the most critical to prefetch.

BUG=631966

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

[modify] https://crrev.com/3eb631ab216ff9ea0302a9e89efe33003b11d935/chrome/browser/predictors/resource_prefetch_predictor_tables.cc
[modify] https://crrev.com/3eb631ab216ff9ea0302a9e89efe33003b11d935/chrome/browser/predictors/resource_prefetch_predictor_tables_unittest.cc
[modify] https://crrev.com/3eb631ab216ff9ea0302a9e89efe33003b11d935/tools/resource_prefetch_predictor/prefetch_predictor_tool.py

Project Member

Comment 24 by bugdroid1@chromium.org, Oct 5 2016

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

commit a1a02928b8033a7e413930b28ca1dff8af773eb9
Author: lizeb <lizeb@chromium.org>
Date: Wed Oct 05 09:32:23 2016

predictors: Make the resource_prefetch_predictor accessible from Java.

This allows the Android code to start and stop prefetches. Now that the
prefetcher is decoupled from navigation, prefetch requests can be issued
with just a URL.

Also finishes converting the prefetch predictor to start and stop prefetches
from a URL.

BUG=631966

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

[add] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ResourcePrefetchPredictor.java
[modify] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/android/java_sources.gni
[modify] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/browser/BUILD.gn
[modify] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/browser/android/chrome_jni_registrar.cc
[modify] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/browser/predictors/resource_prefetch_predictor.h
[add] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/browser/predictors/resource_prefetch_predictor_android.cc
[add] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/browser/predictors/resource_prefetch_predictor_android.h
[modify] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/browser/predictors/resource_prefetcher_manager.cc
[modify] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/browser/predictors/resource_prefetcher_manager.h

Project Member

Comment 25 by bugdroid1@chromium.org, Oct 5 2016

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

commit e3854397b42e53cdc26e9b5237f4f061522a1c45
Author: alexilin <alexilin@chromium.org>
Date: Wed Oct 05 15:50:15 2016

predictors: Refactor resource_prefetch_predictor_tables.

Replace PrefetchData struct by proto message. It changes sqlite tables
structure from 'single resource - single row' to 'single url/host -
single row'. Also get rid of {Host,Url}MetadataTable because we don't need it
anymore.
It allows to get more uniform database structure and reuse the same functions
for manipulating data.

+ 2 little bug fixes:
- Sort redirect data while reading from the database.
- Check the length of the key in redirect table before adding an entry.

BUG=631966

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

[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor.h
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor.proto
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor_tables.cc
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor_tables.h
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor_tables_unittest.cc
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor_test_util.cc
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor_test_util.h
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/ui/webui/predictors/predictors_handler.cc
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/tools/metrics/histograms/histograms.xml

Project Member

Comment 26 by bugdroid1@chromium.org, Oct 7 2016

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

commit a92016445f849baa7dbbfd70de72aaec9bb35086
Author: lizeb <lizeb@chromium.org>
Date: Fri Oct 07 16:10:26 2016

predictors: Update the resource_prefetch_predictor db tool.

The database format has changed, this updates the database visualization tool.

BUG=631966

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

[modify] https://crrev.com/a92016445f849baa7dbbfd70de72aaec9bb35086/tools/resource_prefetch_predictor/prefetch_predictor_tool.py

Project Member

Comment 28 by bugdroid1@chromium.org, Oct 12 2016

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

commit 588e88df5847e11703ffdf063f621d38a66a5fa4
Author: lizeb <lizeb@chromium.org>
Date: Wed Oct 12 15:30:33 2016

customtabs: Add a flag to mayLaunchUrl() to force prefetch.

This adds a flag to mayLaunchUrl() to prevent it from doing a prerender,
forcing the high confidence version to only issue a prefetch
request (using the resource_prefetch_predictor here). This is needed to
test and evaluate it, and is intended for testing purposes only, as the
"no prerendering" flag is as well.

BUG= 650250 ,631966

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

[modify] https://crrev.com/588e88df5847e11703ffdf063f621d38a66a5fa4/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
[modify] https://crrev.com/588e88df5847e11703ffdf063f621d38a66a5fa4/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
[modify] https://crrev.com/588e88df5847e11703ffdf063f621d38a66a5fa4/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java
[modify] https://crrev.com/588e88df5847e11703ffdf063f621d38a66a5fa4/tools/android/customtabs_benchmark/java/src/org/chromium/customtabs/test/MainActivity.java

Comment 29 by lizeb@chromium.org, Oct 14 2016

Blockedon: 655980
Project Member

Comment 34 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/+/a1a02928b8033a7e413930b28ca1dff8af773eb9

commit a1a02928b8033a7e413930b28ca1dff8af773eb9
Author: lizeb <lizeb@chromium.org>
Date: Wed Oct 05 09:32:23 2016

predictors: Make the resource_prefetch_predictor accessible from Java.

This allows the Android code to start and stop prefetches. Now that the
prefetcher is decoupled from navigation, prefetch requests can be issued
with just a URL.

Also finishes converting the prefetch predictor to start and stop prefetches
from a URL.

BUG=631966

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

[add] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ResourcePrefetchPredictor.java
[modify] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/android/java_sources.gni
[modify] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/browser/BUILD.gn
[modify] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/browser/android/chrome_jni_registrar.cc
[modify] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/browser/predictors/resource_prefetch_predictor.h
[add] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/browser/predictors/resource_prefetch_predictor_android.cc
[add] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/browser/predictors/resource_prefetch_predictor_android.h
[modify] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/browser/predictors/resource_prefetcher_manager.cc
[modify] https://crrev.com/a1a02928b8033a7e413930b28ca1dff8af773eb9/chrome/browser/predictors/resource_prefetcher_manager.h

Project Member

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

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

commit e3854397b42e53cdc26e9b5237f4f061522a1c45
Author: alexilin <alexilin@chromium.org>
Date: Wed Oct 05 15:50:15 2016

predictors: Refactor resource_prefetch_predictor_tables.

Replace PrefetchData struct by proto message. It changes sqlite tables
structure from 'single resource - single row' to 'single url/host -
single row'. Also get rid of {Host,Url}MetadataTable because we don't need it
anymore.
It allows to get more uniform database structure and reuse the same functions
for manipulating data.

+ 2 little bug fixes:
- Sort redirect data while reading from the database.
- Check the length of the key in redirect table before adding an entry.

BUG=631966

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

[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor.h
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor.proto
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor_tables.cc
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor_tables.h
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor_tables_unittest.cc
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor_test_util.cc
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor_test_util.h
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/chrome/browser/ui/webui/predictors/predictors_handler.cc
[modify] https://crrev.com/e3854397b42e53cdc26e9b5237f4f061522a1c45/tools/metrics/histograms/histograms.xml

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

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

Comment 37 by bugdroid1@chromium.org, Nov 7 2016

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

commit e4bf55e82fa599637f01e3f6de08bc4d32db6450
Author: alexilin <alexilin@chromium.org>
Date: Mon Nov 07 10:17:13 2016

predictors: ResourcePrefetchPredictorTables cleanup.

Make resource score display in webui correctly.

ResourcePrefetchPredictorTables changes:
- Organize includes and usings.
- Get rid of mocking friend at the cost of moving ctor/dtor from private to
protected section.
- Make ComputeResourceScore public to use it in webui.

BUG=631966

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

[modify] https://crrev.com/e4bf55e82fa599637f01e3f6de08bc4d32db6450/chrome/browser/predictors/resource_prefetch_predictor_tables.cc
[modify] https://crrev.com/e4bf55e82fa599637f01e3f6de08bc4d32db6450/chrome/browser/predictors/resource_prefetch_predictor_tables.h
[modify] https://crrev.com/e4bf55e82fa599637f01e3f6de08bc4d32db6450/chrome/browser/predictors/resource_prefetch_predictor_tables_unittest.cc
[modify] https://crrev.com/e4bf55e82fa599637f01e3f6de08bc4d32db6450/chrome/browser/ui/webui/predictors/predictors_handler.cc

Blockedon: 664135
Project Member

Comment 40 by bugdroid1@chromium.org, Nov 28 2016

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

commit 47c7372e5364d228656e61e79fb1ed91a4e3a4d3
Author: lizeb <lizeb@chromium.org>
Date: Mon Nov 28 18:18:04 2016

predictors: Remove unused field trial configuration parsing.

The code is unused, will likely not come back in the same form, and
forces needless verbosity in forthcoming CLs.

BUG=631966

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

[modify] https://crrev.com/47c7372e5364d228656e61e79fb1ed91a4e3a4d3/chrome/browser/predictors/resource_prefetch_common.cc
[modify] https://crrev.com/47c7372e5364d228656e61e79fb1ed91a4e3a4d3/chrome/browser/predictors/resource_prefetch_common.h
[modify] https://crrev.com/47c7372e5364d228656e61e79fb1ed91a4e3a4d3/chrome/browser/predictors/resource_prefetch_common_unittest.cc

Project Member

Comment 41 by bugdroid1@chromium.org, Nov 30 2016

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

commit f72ac0d75ba64a1afbbaa052fb3135e1fa78fc24
Author: lizeb <lizeb@chromium.org>
Date: Wed Nov 30 09:16:07 2016

predictors: Add a origin for prefetch requests, remove the URL/host settings.

The speculative_prefetch_predictor can start prefetching either due to
an external request, or by observing a navigation. These use cases were
not differentiated previously.
This CL adds:
- A command-line switch to enable external requests only, and
- An origin for prefetch requests.

In addition, URL and host-based learning could previously be controlled
separately. This is unused, as it was only controlled by field trial
groups, and the logic has been removed in crrev.com/2532933002.

BUG=631966

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

[modify] https://crrev.com/f72ac0d75ba64a1afbbaa052fb3135e1fa78fc24/chrome/browser/predictors/resource_prefetch_common.cc
[modify] https://crrev.com/f72ac0d75ba64a1afbbaa052fb3135e1fa78fc24/chrome/browser/predictors/resource_prefetch_common.h
[modify] https://crrev.com/f72ac0d75ba64a1afbbaa052fb3135e1fa78fc24/chrome/browser/predictors/resource_prefetch_common_unittest.cc
[modify] https://crrev.com/f72ac0d75ba64a1afbbaa052fb3135e1fa78fc24/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/f72ac0d75ba64a1afbbaa052fb3135e1fa78fc24/chrome/browser/predictors/resource_prefetch_predictor.h
[modify] https://crrev.com/f72ac0d75ba64a1afbbaa052fb3135e1fa78fc24/chrome/browser/predictors/resource_prefetch_predictor_android.cc
[modify] https://crrev.com/f72ac0d75ba64a1afbbaa052fb3135e1fa78fc24/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
[modify] https://crrev.com/f72ac0d75ba64a1afbbaa052fb3135e1fa78fc24/chrome/common/chrome_switches.cc
[modify] https://crrev.com/f72ac0d75ba64a1afbbaa052fb3135e1fa78fc24/chrome/common/chrome_switches.h

Project Member

Comment 42 by bugdroid1@chromium.org, Dec 1 2016

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

commit 68b12e34f76bcd64a4764aeada8b962120b4b470
Author: alexilin <alexilin@chromium.org>
Date: Thu Dec 01 18:23:33 2016

predictors: Take RESOURCE_TYPE_XHR into account.

Some useful subresources could be fetched by webpages via XMLHttpRequest. This
CL adds support of this type of requests to ResourcePrefetchPredictor.

BUG=631966

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

[modify] https://crrev.com/68b12e34f76bcd64a4764aeada8b962120b4b470/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/68b12e34f76bcd64a4764aeada8b962120b4b470/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc

Project Member

Comment 43 by bugdroid1@chromium.org, Dec 9 2016

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

commit d38f1d7f0c8d8caf40232f071269b21288b9452e
Author: ahemery <ahemery@chromium.org>
Date: Fri Dec 09 13:07:51 2016

Summary
-----
With PlzNavigate, main frame navigations
don't have a valid (render_process_id, render_frame_id). This CL is a
preliminary refactoring to properly support PlzNavigate.

Details
-----
To be able to do browser navigations to non yet created frames, we use
webcontents that will always be available. This is preparation work
to be able to use webcontents identification instead of frame ids easily.

At the higher level we are passing a WebContentsGetter and run it on a
UI thread, leading to new dedicated functions in the observer. We then
use a wrapper to initialize the NavigationID part of the request summary.
SummarizeResponse is not responsible for filling in NavigationID any more,
and the behavior has been updated in unit tests.

BUG=631966

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

[modify] https://crrev.com/d38f1d7f0c8d8caf40232f071269b21288b9452e/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
[modify] https://crrev.com/d38f1d7f0c8d8caf40232f071269b21288b9452e/chrome/browser/net/resource_prefetch_predictor_observer.cc
[modify] https://crrev.com/d38f1d7f0c8d8caf40232f071269b21288b9452e/chrome/browser/net/resource_prefetch_predictor_observer.h
[modify] https://crrev.com/d38f1d7f0c8d8caf40232f071269b21288b9452e/chrome/browser/predictors/resource_prefetch_common.cc
[modify] https://crrev.com/d38f1d7f0c8d8caf40232f071269b21288b9452e/chrome/browser/predictors/resource_prefetch_common.h
[modify] https://crrev.com/d38f1d7f0c8d8caf40232f071269b21288b9452e/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/d38f1d7f0c8d8caf40232f071269b21288b9452e/chrome/browser/predictors/resource_prefetch_predictor.h
[modify] https://crrev.com/d38f1d7f0c8d8caf40232f071269b21288b9452e/chrome/browser/predictors/resource_prefetch_predictor_test_util.cc
[modify] https://crrev.com/d38f1d7f0c8d8caf40232f071269b21288b9452e/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
[modify] https://crrev.com/d38f1d7f0c8d8caf40232f071269b21288b9452e/chrome/browser/predictors/resource_prefetcher_unittest.cc

Project Member

Comment 44 by bugdroid1@chromium.org, Dec 19 2016

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

commit e5c15db9908512b44a0a47f6b24098d8daeffeb1
Author: lizeb <lizeb@chromium.org>
Date: Mon Dec 19 12:39:25 2016

predictors: Reduce the maximum concurrent prefetches.

In the resource_prefetch_predictor, the maximum number of concurrent
prefetches is set to 24. This is too high, as:
- It defeats the prioritization of resources in the database
- It was shown to slow down page loads in some case on slow connections
  by starving the page load resource fetches. (local testing using WPR
  and tools in tools/resource_prefetch_predictor)

BUG=631966,655980

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

[modify] https://crrev.com/e5c15db9908512b44a0a47f6b24098d8daeffeb1/chrome/browser/predictors/resource_prefetch_common.cc
[modify] https://crrev.com/e5c15db9908512b44a0a47f6b24098d8daeffeb1/chrome/browser/predictors/resource_prefetcher_unittest.cc

Blockedon: 677666
Blockedon: 680049
Project Member

Comment 47 by bugdroid1@chromium.org, Jan 11 2017

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

commit 37127ecd00687cd497d8ef19067eede1c70dfd76
Author: alexilin <alexilin@chromium.org>
Date: Wed Jan 11 17:36:38 2017

predictors: db tool workaround to solve sqlite3 compatibility problem.

Current version of python sqilte3 library hasn't support of views. But new
sqlite3 binary used in chrome implicitly creates MmapStatus view everytime that
causes incompatibility problem. This workaround creates a temporary copy of
given database and deletes the view through sqlite3 command line tool that has
support of views.

BUG=631966

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

[modify] https://crrev.com/37127ecd00687cd497d8ef19067eede1c70dfd76/tools/resource_prefetch_predictor/prefetch_predictor_tool.py

Project Member

Comment 48 by bugdroid1@chromium.org, Jan 26 2017

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

commit f0e87360ae1a1dfae4bf0deb8cacd9db5a785466
Author: lizeb <lizeb@chromium.org>
Date: Thu Jan 26 10:46:45 2017

predictors: Move the configuration of speculative prefetch to field trials.

BUG=631966

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

[modify] https://crrev.com/f0e87360ae1a1dfae4bf0deb8cacd9db5a785466/chrome/browser/predictors/resource_prefetch_common.cc
[modify] https://crrev.com/f0e87360ae1a1dfae4bf0deb8cacd9db5a785466/chrome/browser/predictors/resource_prefetch_common.h
[modify] https://crrev.com/f0e87360ae1a1dfae4bf0deb8cacd9db5a785466/chrome/browser/predictors/resource_prefetch_common_unittest.cc
[modify] https://crrev.com/f0e87360ae1a1dfae4bf0deb8cacd9db5a785466/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc
[modify] https://crrev.com/f0e87360ae1a1dfae4bf0deb8cacd9db5a785466/chrome/common/chrome_switches.cc
[modify] https://crrev.com/f0e87360ae1a1dfae4bf0deb8cacd9db5a785466/chrome/common/chrome_switches.h
[modify] https://crrev.com/f0e87360ae1a1dfae4bf0deb8cacd9db5a785466/tools/android/customtabs_benchmark/scripts/customtabs_benchmark.py
[modify] https://crrev.com/f0e87360ae1a1dfae4bf0deb8cacd9db5a785466/tools/resource_prefetch_predictor/generate_test_data.py
[modify] https://crrev.com/f0e87360ae1a1dfae4bf0deb8cacd9db5a785466/tools/resource_prefetch_predictor/prefetch_benchmark.py

Project Member

Comment 49 by bugdroid1@chromium.org, Feb 16 2017

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

commit 239a309b3ab26db7aaac940b124e03f6461fb8ec
Author: alexilin <alexilin@chromium.org>
Date: Thu Feb 16 17:22:30 2017

predictors: Fix prefetch benchmark.

Benchmark code was broken after https://crrev.com/2652313002. This CL removes
usage of undecleared variable.

BUG=631966

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

[modify] https://crrev.com/239a309b3ab26db7aaac940b124e03f6461fb8ec/tools/resource_prefetch_predictor/prefetch_benchmark.py

Project Member

Comment 50 by bugdroid1@chromium.org, Feb 24 2017

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

commit d8c3159729df90d3b12c71c9ab6e5accd7bdf4aa
Author: alexilin <alexilin@chromium.org>
Date: Fri Feb 24 16:35:01 2017

predictors: Downgrade net priority of prefetch requests.

Prefetch predictor currently uses net::LOW priority to fetch resources
that is higher than default priority for images, for example. This CL
sets net::IDLE level for such requests.
It allows to prioritize renderer requests above speculative ones.

BUG=631966

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

[modify] https://crrev.com/d8c3159729df90d3b12c71c9ab6e5accd7bdf4aa/chrome/browser/predictors/resource_prefetcher.cc

Project Member

Comment 51 by bugdroid1@chromium.org, Feb 24 2017

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

commit d8c3159729df90d3b12c71c9ab6e5accd7bdf4aa
Author: alexilin <alexilin@chromium.org>
Date: Fri Feb 24 16:35:01 2017

predictors: Downgrade net priority of prefetch requests.

Prefetch predictor currently uses net::LOW priority to fetch resources
that is higher than default priority for images, for example. This CL
sets net::IDLE level for such requests.
It allows to prioritize renderer requests above speculative ones.

BUG=631966

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

[modify] https://crrev.com/d8c3159729df90d3b12c71c9ab6e5accd7bdf4aa/chrome/browser/predictors/resource_prefetcher.cc

Project Member

Comment 52 by bugdroid1@chromium.org, Feb 28 2017

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

commit 1e620aa2262f96a9cad722d7e5a9266a218ae279
Author: alexilin <alexilin@chromium.org>
Date: Tue Feb 28 15:28:48 2017

predictors: Call StopPrefetching with an url before redirect.

It was wrong to use main_frame_url as a parameter for StopPrefetching because
if we have a redirect, StartPrefetching is called with initial_url and
prefetcher manager knows nothing about further redirects. The easiest way to fix
it is to keep using initial_url in all calls to prefetcher manager.
Additionaly, this CL adds a report to prefetch duration histogram in case if we
evict inflight prefetch by timeout.

BUG=631966

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

[modify] https://crrev.com/1e620aa2262f96a9cad722d7e5a9266a218ae279/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/1e620aa2262f96a9cad722d7e5a9266a218ae279/chrome/browser/predictors/resource_prefetch_predictor.h
[modify] https://crrev.com/1e620aa2262f96a9cad722d7e5a9266a218ae279/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc

Blockedon: 699115

Comment 56 by lizeb@chromium.org, Mar 13 2017

Blockedon: 700886
Project Member

Comment 59 by bugdroid1@chromium.org, Apr 12 2017

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

commit 93cb7df1f935461d1b3c5544f0c7efe38097d8d7
Author: alexilin <alexilin@chromium.org>
Date: Wed Apr 12 19:16:27 2017

predictors: Several improvements for redirects database.

This CL aims to improve redirects handling in the ResourcePrefetchPredictor by
considering the URL/host itself along with redirect endpoints (1) and handling
special case when there is no permanent redirect for a host (2).

(1) helps to avoid incorrect predictions in scenario when the URL/host doesn't
have a permanent redirect and the predictor mistakenly uses the fallback to
fetching based on the first main frame url in the redirect chain.

(2) allows to ignore "megamorphic" URLs/hosts. For example, url shorteners.

BUG=631966

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

[modify] https://crrev.com/93cb7df1f935461d1b3c5544f0c7efe38097d8d7/chrome/browser/predictors/resource_prefetch_common.cc
[modify] https://crrev.com/93cb7df1f935461d1b3c5544f0c7efe38097d8d7/chrome/browser/predictors/resource_prefetch_common.h
[modify] https://crrev.com/93cb7df1f935461d1b3c5544f0c7efe38097d8d7/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/93cb7df1f935461d1b3c5544f0c7efe38097d8d7/chrome/browser/predictors/resource_prefetch_predictor.h
[modify] https://crrev.com/93cb7df1f935461d1b3c5544f0c7efe38097d8d7/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc

Project Member

Comment 60 by bugdroid1@chromium.org, Apr 13 2017

Project Member

Comment 61 by bugdroid1@chromium.org, May 2 2017

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

commit ba9f7b9f476e705395814878d9e2401118384b60
Author: trevordixon <trevordixon@chromium.org>
Date: Tue May 02 13:41:00 2017

predictors: Mark before_first_contentful_paint for resources fetched before fcp.

BUG=631966
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

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

[modify] https://crrev.com/ba9f7b9f476e705395814878d9e2401118384b60/chrome/browser/page_load_metrics/observers/resource_prefetch_predictor_page_load_metrics_observer.cc
[modify] https://crrev.com/ba9f7b9f476e705395814878d9e2401118384b60/chrome/browser/page_load_metrics/observers/resource_prefetch_predictor_page_load_metrics_observer.h
[modify] https://crrev.com/ba9f7b9f476e705395814878d9e2401118384b60/chrome/browser/page_load_metrics/observers/resource_prefetch_predictor_page_load_metrics_observer_unittest.cc
[modify] https://crrev.com/ba9f7b9f476e705395814878d9e2401118384b60/chrome/browser/predictors/resource_prefetch_predictor.cc
[modify] https://crrev.com/ba9f7b9f476e705395814878d9e2401118384b60/chrome/browser/predictors/resource_prefetch_predictor.h
[modify] https://crrev.com/ba9f7b9f476e705395814878d9e2401118384b60/chrome/browser/predictors/resource_prefetch_predictor.proto
[modify] https://crrev.com/ba9f7b9f476e705395814878d9e2401118384b60/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc
[modify] https://crrev.com/ba9f7b9f476e705395814878d9e2401118384b60/chrome/browser/predictors/resource_prefetch_predictor_tables.h
[modify] https://crrev.com/ba9f7b9f476e705395814878d9e2401118384b60/chrome/browser/predictors/resource_prefetch_predictor_test_util.cc
[modify] https://crrev.com/ba9f7b9f476e705395814878d9e2401118384b60/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
[modify] https://crrev.com/ba9f7b9f476e705395814878d9e2401118384b60/chrome/browser/resources/predictors/resource_prefetch_predictor.html
[modify] https://crrev.com/ba9f7b9f476e705395814878d9e2401118384b60/chrome/browser/resources/predictors/resource_prefetch_predictor.js
[modify] https://crrev.com/ba9f7b9f476e705395814878d9e2401118384b60/chrome/browser/ui/webui/predictors/predictors_handler.cc
[add] https://crrev.com/ba9f7b9f476e705395814878d9e2401118384b60/chrome/test/data/predictors/subresource_fcp_order.html

Project Member

Comment 62 by bugdroid1@chromium.org, May 11 2017

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

commit 02b1d73344512180911bc5280438b840dd5105c8
Author: alexilin <alexilin@chromium.org>
Date: Thu May 11 11:33:18 2017

Revert of predictors: Enable SpeculativeResourcePrefetching for fieldtrial testing. (patchset #2 id:20001 of https://codereview.chromium.org/2856893004/ )

Reason for revert:
SpeculativePrefetching causes regressions for those tests that are forced to load all resources from the network.

Original issue's description:
> predictors: Enable SpeculativeResourcePrefetching for fieldtrial testing.
>
> BUG=631966
>
> Review-Url: https://codereview.chromium.org/2856893004
> Cr-Commit-Position: refs/heads/master@{#469317}
> Committed: https://chromium.googlesource.com/chromium/src/+/f89e3e140fa7c28737f493a02e7103ab3946a677

TBR=jwd@chromium.org,pasko@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=631966, 718910 

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

[modify] https://crrev.com/02b1d73344512180911bc5280438b840dd5105c8/testing/variations/fieldtrial_testing_config.json

Sign in to add a comment