|
|
Description[NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE
As opposed to a full prerender, a prefetch could be repeated relatively soon.
This CL prevent this by detecting repeated prefetches and cancelling them with
FINAL_STATUS_DUPLICATE.
The threshold used is net::HttpCache::kPrefetchReuseMins (5 minutes), which
should roughly match what is happening for full prerenders.
Committed: https://crrev.com/fc6a827302dc5a72dddedaab32fe6e48e6a58dfe
Cr-Commit-Position: refs/heads/master@{#441397}
Patch Set 1 #Patch Set 2 : handle null prefetch age #Patch Set 3 : add unittest #Patch Set 4 : more comments #
Total comments: 3
Patch Set 5 : fix origin bug #Patch Set 6 : Update test to use kPrefetchReuseMins #
Messages
Total messages: 38 (27 generated)
The CQ bit was checked by droger@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by droger@chromium.org to run a CQ dry run
Patchset #2 (id:20001) has been deleted
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== [NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE As opposed to a full prerender, a prefetch could be repeated relatively soon. This CL prevent this by detecting recent prefetches and cancelling them with FINAL_STATUS_DUPLICATE. The threshold used is config.time_to_live, which should roughly match what is happening for full prerenders. ========== to ========== [NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE As opposed to a full prerender, a prefetch could be repeated relatively soon. This CL prevent this by detecting recent prefetches and cancelling them with FINAL_STATUS_DUPLICATE. The threshold used is PrerenderCongig::time_to_live (5 minutes), which should roughly match what is happening for full prerenders. ==========
Description was changed from ========== [NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE As opposed to a full prerender, a prefetch could be repeated relatively soon. This CL prevent this by detecting recent prefetches and cancelling them with FINAL_STATUS_DUPLICATE. The threshold used is PrerenderCongig::time_to_live (5 minutes), which should roughly match what is happening for full prerenders. ========== to ========== [NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE As opposed to a full prerender, a prefetch could be repeated relatively soon. This CL prevent this by detecting recent prefetches and cancelling them with FINAL_STATUS_DUPLICATE. The threshold used is PrerenderConfig::time_to_live (5 minutes), which should roughly match what is happening for full prerenders. ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by droger@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
droger@chromium.org changed reviewers: + mattcary@chromium.org, pasko@chromium.org
Description was changed from ========== [NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE As opposed to a full prerender, a prefetch could be repeated relatively soon. This CL prevent this by detecting recent prefetches and cancelling them with FINAL_STATUS_DUPLICATE. The threshold used is PrerenderConfig::time_to_live (5 minutes), which should roughly match what is happening for full prerenders. ========== to ========== [NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE As opposed to a full prerender, a prefetch could be repeated relatively soon. This CL prevent this by detecting repeated prefetches and cancelling them with FINAL_STATUS_DUPLICATE. The threshold used is PrerenderConfig::time_to_live (5 minutes), which should roughly match what is happening for full prerenders. ==========
It may also make sense to use net::HttpCache::kPrefetchReuseMins instead of time_to_live. That would mean that we don't repeat prefetches as long as they are fresh enough to avoid revalidation.
On 2017/01/04 14:17:40, droger wrote: > It may also make sense to use net::HttpCache::kPrefetchReuseMins instead of > time_to_live. That would mean that we don't repeat prefetches as long as they > are fresh enough to avoid revalidation. That may make more sense. Long-term, there's no reason for this to have anything to do with prerender.
lgtm
overall looks good https://codereview.chromium.org/2614473002/diff/80001/chrome/browser/prerende... File chrome/browser/prerender/prerender_manager.cc (right): https://codereview.chromium.org/2614473002/diff/80001/chrome/browser/prerende... chrome/browser/prerender/prerender_manager.cc:946: Origin origin; overriding |origin| in this local scope looks dangerous, can it be |prefetch_origin|? https://codereview.chromium.org/2614473002/diff/80001/chrome/browser/prerende... chrome/browser/prerender/prerender_manager.cc:949: RecordFinalStatusWithoutCreatingPrerenderContents(url, origin, this should register the origin from the AddPrerender arg, not the origin from prefetch information, right?
The CQ bit was checked by droger@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Thanks. Fixed the bug and used net::HttpCache::kPrefetchReuseMins. Please take a look. https://codereview.chromium.org/2614473002/diff/80001/chrome/browser/prerende... File chrome/browser/prerender/prerender_manager.cc (right): https://codereview.chromium.org/2614473002/diff/80001/chrome/browser/prerende... chrome/browser/prerender/prerender_manager.cc:949: RecordFinalStatusWithoutCreatingPrerenderContents(url, origin, On 2017/01/04 15:00:45, pasko wrote: > this should register the origin from the AddPrerender arg, not the origin from > prefetch information, right? This is a bug, good catch. The local variable should not be used, only the parameter from the function is important.
lgtm, thank you!
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== [NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE As opposed to a full prerender, a prefetch could be repeated relatively soon. This CL prevent this by detecting repeated prefetches and cancelling them with FINAL_STATUS_DUPLICATE. The threshold used is PrerenderConfig::time_to_live (5 minutes), which should roughly match what is happening for full prerenders. ========== to ========== [NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE As opposed to a full prerender, a prefetch could be repeated relatively soon. This CL prevent this by detecting repeated prefetches and cancelling them with FINAL_STATUS_DUPLICATE. The threshold used is net::HttpCache::kPrefetchReuseMins (5 minutes), which should roughly match what is happening for full prerenders. ==========
Description was changed from ========== [NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE As opposed to a full prerender, a prefetch could be repeated relatively soon. This CL prevent this by detecting repeated prefetches and cancelling them with FINAL_STATUS_DUPLICATE. The threshold used is net::HttpCache::kPrefetchReuseMins (5 minutes), which should roughly match what is happening for full prerenders. ========== to ========== [NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE As opposed to a full prerender, a prefetch could be repeated relatively soon. This CL prevent this by detecting repeated prefetches and cancelling them with FINAL_STATUS_DUPLICATE. The threshold used is net::HttpCache::kPrefetchReuseMins (5 minutes), which should roughly match what is happening for full prerenders. ==========
The CQ bit was checked by droger@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from mattcary@chromium.org Link to the patchset: https://codereview.chromium.org/2614473002/#ps100001 (title: "fix origin bug")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by droger@chromium.org
The CQ bit was checked by droger@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from pasko@chromium.org, mattcary@chromium.org Link to the patchset: https://codereview.chromium.org/2614473002/#ps120001 (title: "Update test to use kPrefetchReuseMins")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 120001, "attempt_start_ts": 1483546142612950, "parent_rev": "47fea1667a80f54a036b05f410198566d5154aa4", "commit_rev": "aa154f3d9c1c7596e17051ce63269b80dbed5fec"}
Message was sent while issue was closed.
Description was changed from ========== [NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE As opposed to a full prerender, a prefetch could be repeated relatively soon. This CL prevent this by detecting repeated prefetches and cancelling them with FINAL_STATUS_DUPLICATE. The threshold used is net::HttpCache::kPrefetchReuseMins (5 minutes), which should roughly match what is happening for full prerenders. ========== to ========== [NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE As opposed to a full prerender, a prefetch could be repeated relatively soon. This CL prevent this by detecting repeated prefetches and cancelling them with FINAL_STATUS_DUPLICATE. The threshold used is net::HttpCache::kPrefetchReuseMins (5 minutes), which should roughly match what is happening for full prerenders. Review-Url: https://codereview.chromium.org/2614473002 ==========
Message was sent while issue was closed.
Committed patchset #6 (id:120001)
Message was sent while issue was closed.
Description was changed from ========== [NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE As opposed to a full prerender, a prefetch could be repeated relatively soon. This CL prevent this by detecting repeated prefetches and cancelling them with FINAL_STATUS_DUPLICATE. The threshold used is net::HttpCache::kPrefetchReuseMins (5 minutes), which should roughly match what is happening for full prerenders. Review-Url: https://codereview.chromium.org/2614473002 ========== to ========== [NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE As opposed to a full prerender, a prefetch could be repeated relatively soon. This CL prevent this by detecting repeated prefetches and cancelling them with FINAL_STATUS_DUPLICATE. The threshold used is net::HttpCache::kPrefetchReuseMins (5 minutes), which should roughly match what is happening for full prerenders. Committed: https://crrev.com/fc6a827302dc5a72dddedaab32fe6e48e6a58dfe Cr-Commit-Position: refs/heads/master@{#441397} ==========
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/fc6a827302dc5a72dddedaab32fe6e48e6a58dfe Cr-Commit-Position: refs/heads/master@{#441397} |