Chromium Code Reviews
Help | Chromium Project | Sign in
(8)

Issue 3050016: Implement prefetching in chrome (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 11 months ago by gavinp
Modified:
4 years ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, ben+cc_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, PaweĊ‚ Hajdan Jr.
Visibility:
Public.

Description

Implement prefetching in chrome With this CL (see also issue 2910009), chrome will support basic prefetching. You can optionally deactivate prefetching with the command line argument --disable-prefetch. A new RequestPriority was created as well, IDLE, which is lower than LOWEST. Unfortunately, SPDY has only two bits for priority, so as a temporary measure (pending SPDY v3 which will have three), we have a mapping in SPDY that folds net::LOWEST and net::IDLE together. BUG=13505 TEST=http://gemal.dk/browserspy/prefetch.php Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=54421

Patch Set 1 #

Total comments: 21

Patch Set 2 : remediate to review, add tests #

Total comments: 9

Patch Set 3 : remediate to mbelshe's comments #

Total comments: 11

Patch Set 4 : last upload missed prefetch.py changes #

Patch Set 5 : merge to trunk #

Unified diffs Side-by-side diffs Delta from patch set Stats (+269 lines, -26 lines) Patch
M build/features_override.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 2 chunks +10 lines, -1 line 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/test/functional/prefetch.py View 2 3 1 chunk +138 lines, -0 lines 0 comments Download
M net/base/host_resolver_impl.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M net/base/request_priority.h View 1 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_network_transaction.h View 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M net/http/http_network_transaction.cc View 3 4 1 chunk +16 lines, -0 lines 0 comments Download
M net/socket/client_socket_pool_base_unittest.cc View 3 chunks +9 lines, -7 lines 0 comments Download
M net/spdy/spdy_network_transaction_unittest.cc View 2 3 4 5 chunks +61 lines, -4 lines 0 comments Download
M net/spdy/spdy_session.cc View 1 2 3 chunks +6 lines, -5 lines 0 comments Download
M net/spdy/spdy_stream_unittest.cc View 2 1 chunk +1 line, -1 line 0 comments Download
M net/spdy/spdy_test_util.cc View 2 3 4 6 chunks +12 lines, -5 lines 0 comments Download
M net/url_request/url_request.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M webkit/glue/resource_type.h View 1 chunk +1 line, -0 lines 0 comments Download
M webkit/glue/weburlloader_impl.cc View 1 chunk +2 lines, -0 lines 0 comments Download
Commit: CQ not working?

Messages

Total messages: 14 (0 generated)
gavinp
Here's my second pass at this patch; Chris I've incorporated some of your comments from ...
4 years, 11 months ago (2010-07-24 01:30:25 UTC) #1
gavinp
(I've got a functional test in the works as well, but it's hit a few ...
4 years, 11 months ago (2010-07-24 01:40:48 UTC) #2
tonyg
Looking great. All my comments are minor/trivial nits. I'd also be interested in seeing some ...
4 years, 11 months ago (2010-07-26 16:15:37 UTC) #3
cbentzel
http://codereview.chromium.org/3050016/diff/1/9 File net/spdy/spdy_framer.h (right): http://codereview.chromium.org/3050016/diff/1/9#newcode242 net/spdy/spdy_framer.h:242: // prefetches into one). On 2010/07/26 16:15:37, tonyg wrote: ...
4 years, 11 months ago (2010-07-26 17:06:32 UTC) #4
cbentzel
LGTM, assuming you add some unit tests (RequestPriority -> SPDY priority being an easy one, ...
4 years, 11 months ago (2010-07-26 17:18:59 UTC) #5
gavinp
This latest upload adds a lot more tests, and remediates to review. The functional test ...
4 years, 11 months ago (2010-07-29 15:22:59 UTC) #6
Mike Belshe
sorry to ask you to move the priority function!!! otherwise LGTM Mike http://codereview.chromium.org/3050016/diff/7003/14005 File chrome/test/functional/prefetch.py ...
4 years, 11 months ago (2010-07-29 16:15:39 UTC) #7
gavinp
I moved ConvertRequestPriorityToSpdyPriority into http_network_transaction, but left it just in namespace net. http://codereview.chromium.org/3050016/diff/7003/14005 File chrome/test/functional/prefetch.py ...
4 years, 11 months ago (2010-07-29 18:59:29 UTC) #8
Mike Belshe
http://codereview.chromium.org/3050016/diff/19001/20005 File chrome/test/functional/prefetch.py (right): http://codereview.chromium.org/3050016/diff/19001/20005#newcode8 chrome/test/functional/prefetch.py:8: # and the tests assert that the webserver logs ...
4 years, 11 months ago (2010-07-29 19:36:16 UTC) #9
Mike Belshe
lgtm with removal of spdy_framer.cc/h.
4 years, 11 months ago (2010-07-29 19:36:34 UTC) #10
cbentzel
LGTM! http://codereview.chromium.org/3050016/diff/19001/20005 File chrome/test/functional/prefetch.py (right): http://codereview.chromium.org/3050016/diff/19001/20005#newcode83 chrome/test/functional/prefetch.py:83: var para = document.getElementById("firstparagraph"); Which element is "firstparagraph"? ...
4 years, 11 months ago (2010-07-30 03:13:20 UTC) #11
gavinp
thanks for the reviews. with no objections and a try-blessing, i'll land this version today. ...
4 years, 11 months ago (2010-07-30 15:14:45 UTC) #12
jar (doing other things)
I don't know why I didn't see this review earlier... my name seems to be ...
4 years, 11 months ago (2010-07-31 02:08:18 UTC) #13
gavinp
4 years, 11 months ago (2010-07-31 02:29:22 UTC) #14
Jim, I agree completely.

My view is that prefetching is only tentatively in M7 until we get results; I
want to land histograms and an experiment as quickly as possible.  If we don't
see solid results in an experiment (using histograms similar to what we
discussed earlier), then I think we need to revisit the default of using
prefetching.

- Gavin

On 2010/07/31 02:08:18, jar wrote:
> I don't know why I didn't see this review earlier... my name seems to be on
the
> reviewers list... but none of the review  emails were sent to me :-(.  I'll
take
> a wild/silly guess that only saying "jar" is not enough and you need "jar at
> chromium.org."  oh well...
> 
> That said...
> 
> The biggest thing that I think is missing from this landing is any way to
> monitor results.  At a minimum, it would be good to understand how often this
> feature is getting used, probably as compared with some other activity.  For
> example, you could normalize relative to page loads, or relative to network
> transactions (which include subresources).  You might also want to normalize
> prefetched bytes vs overall fetched bytes.
> 
> Better yet, it would be good to understand how often a resource was fetched,
and
> then never used (because it was evicted, its cached version proved unusable,
or
> because it could not be cached for some reason), vs how often it ended up
being
> used.
> 
> Finally, it would be great to set up an A/B experiment to try to eval the
impact
> on PLT (Page Load Time).  Prefetching of resources can help if we end up going
> to a page, but will hurt if they clog our pipes while we're trying to go
> elsewhere (or if they clog our pipes while we're trying to load the rest of
the
> current page).
> 
> One of the weaknesses in the current server side support for this feature in
> that there is no feedback as to overall effectiveness, and hence it is
difficult
> to optimize thresholds etc.  IMO, one of the greatest benefits of implementing
> this is to supply feedback, and gather some quantitative data.
> 
> Bottom line: You need to add several of histograms, and probably a field-trial
> test to modulate some PLT histograms.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 2cec24f