Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Issue 441923002: Add a PrefetchList to Prerender Local Predictor, to emulate how effective (Closed)

Created:
6 years, 4 months ago by tburkard
Modified:
6 years, 4 months ago
CC:
chromium-reviews, davidben+watch_chromium.org, cbentzel+watch_chromium.org, tburkard+watch_chromium.org, gavinp+prer_chromium.org, dominich+watch_chromium.org, asvitkine+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Add a PrefetchList to Prerender Local Predictor, to emulate how effective prefetches would be. The hope is to obtain higher numbers than with prerender control group prerenders, since these still get cancelled for a fair number of reasons. R=asvitkine@chromium.org, davidben@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287582

Patch Set 1 #

Total comments: 21

Patch Set 2 : incorporate comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -19 lines) Patch
M chrome/browser/prerender/prerender_field_trial.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_field_trial.cc View 3 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_local_predictor.h View 4 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/prerender/prerender_local_predictor.cc View 1 11 chunks +124 lines, -17 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
tburkard
It'd be great if I could commit this today, since we desperately need the numbers ...
6 years, 4 months ago (2014-08-05 10:45:57 UTC) #1
davidben
lgtm with some style nits. Also a comment below about num_issued. https://codereview.chromium.org/441923002/diff/1/chrome/browser/prerender/prerender_field_trial.cc File chrome/browser/prerender/prerender_field_trial.cc (right): ...
6 years, 4 months ago (2014-08-05 18:51:12 UTC) #2
Alexei Svitkine (slow)
histograms lgtm, couple style comments https://codereview.chromium.org/441923002/diff/1/chrome/browser/prerender/prerender_local_predictor.cc File chrome/browser/prerender/prerender_local_predictor.cc (right): https://codereview.chromium.org/441923002/diff/1/chrome/browser/prerender/prerender_local_predictor.cc#newcode467 chrome/browser/prerender/prerender_local_predictor.cc:467: explicit ListEntry(string url) Pass ...
6 years, 4 months ago (2014-08-05 19:20:22 UTC) #3
tburkard
https://codereview.chromium.org/441923002/diff/1/chrome/browser/prerender/prerender_field_trial.cc File chrome/browser/prerender/prerender_field_trial.cc (right): https://codereview.chromium.org/441923002/diff/1/chrome/browser/prerender/prerender_field_trial.cc#newcode391 chrome/browser/prerender/prerender_field_trial.cc:391: StringToInt(GetLocalPredictorSpecValue(kPrefetchListTimeoutKeyName), &result); On 2014/08/05 18:51:12, David Benjamin wrote: > ...
6 years, 4 months ago (2014-08-05 20:05:55 UTC) #4
tburkard
Committed patchset #2 manually as 287582 (presubmit successful).
6 years, 4 months ago (2014-08-05 20:08:56 UTC) #5
Alexei Svitkine (slow)
6 years, 4 months ago (2014-08-05 20:16:22 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/441923002/diff/1/chrome/browser/prerender/pre...
File chrome/browser/prerender/prerender_local_predictor.cc (right):

https://codereview.chromium.org/441923002/diff/1/chrome/browser/prerender/pre...
chrome/browser/prerender/prerender_local_predictor.cc:488: delete entry;
On 2014/08/05 20:05:54, tburkard wrote:
> On 2014/08/05 19:20:22, Alexei Svitkine wrote:
> > Can you use a scoped_ptr instead?
> 
> Not obvious to me how this would work well here.
> Can you point me to some existing code using a scoped_ptr inside STL
containers?
> I can change it in a follow-up CL (since I want to commit this today for
> tomorrow's build and it's already 10pm in my timezone).
> 
> Thanks.

Sorry, I meant in the body of the loop, not in the container - i.e.:

scoped_ptr<ListEntry> entry(entry_list_.front());
entry_list_.pop_front();

Then you don't need the delete (which is more error prone - e.g. if you decide
to add a break or continue statement later to the loop).

As for containers with owned pointers, I think we just have a ScopedVector,
which I didn't read your code careful enough to understand whether it's a good
fit here or not.

Powered by Google App Engine
This is Rietveld 408576698