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

Issue 2926693002: Make content::ThrottlingURLLoader take a task runner and more efficient. (Closed)

Created:
3 years, 6 months ago by yzshen1
Modified:
3 years, 6 months ago
Reviewers:
jam
CC:
chromium-reviews, darin-cc_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make content::ThrottlingURLLoader take a task runner and more efficient. - The task runner is used to dispatch URLLoaderClient messages. - Previously it had got many members to cache params when operations were deferred. This CL groups those params into structs and only creates instances when necessary. BUG=729769, 715673 Review-Url: https://codereview.chromium.org/2926693002 Cr-Commit-Position: refs/heads/master@{#477687} Committed: https://chromium.googlesource.com/chromium/src/+/e2e435ef7d38319633f7a01d051f2760af8806c7

Patch Set 1 #

Patch Set 2 : sync & resolve #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -60 lines) Patch
M content/child/resource_dispatcher.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M content/child/url_loader_client_impl.h View 3 chunks +0 lines, -4 lines 0 comments Download
M content/child/url_loader_client_impl.cc View 2 chunks +1 line, -6 lines 0 comments Download
M content/common/throttling_url_loader.h View 1 4 chunks +57 lines, -15 lines 0 comments Download
M content/common/throttling_url_loader.cc View 1 8 chunks +81 lines, -33 lines 0 comments Download

Messages

Total messages: 14 (8 generated)
yzshen1
Hi, John. Would you please take a look? Thanks!
3 years, 6 months ago (2017-06-06 23:37:29 UTC) #4
jam
On 2017/06/06 23:37:29, yzshen1 wrote: > Hi, John. > > Would you please take a ...
3 years, 6 months ago (2017-06-07 01:24:21 UTC) #7
yzshen1
On 2017/06/07 01:24:21, jam wrote: > On 2017/06/06 23:37:29, yzshen1 wrote: > > Hi, John. ...
3 years, 6 months ago (2017-06-07 16:57:37 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2926693002/20001
3 years, 6 months ago (2017-06-07 16:59:48 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/e2e435ef7d38319633f7a01d051f2760af8806c7
3 years, 6 months ago (2017-06-07 17:05:26 UTC) #13
jam
3 years, 6 months ago (2017-06-07 17:10:33 UTC) #14
Message was sent while issue was closed.
On 2017/06/07 16:57:37, yzshen1 wrote:
> On 2017/06/07 01:24:21, jam wrote:
> > On 2017/06/06 23:37:29, yzshen1 wrote:
> > > Hi, John.
> > > 
> > > Would you please take a look? Thanks!
> > 
> > I'm curious, did you repro the slowdown locally or are these fixes by
> > inspection? I ask because moving member variables to structs makes the code
> > slightly less readable, so I'm wondering if you can first try the task
runner
> > change and if it's enough on the perf bots then no need to make further
> changes?
> > 
> > lgtm, i leave it up to you
> 
> I tested on Windows (which is one of the platforms showing the slowdown) and
> confirmed that this fix restored the timeToFirstMeaningfulPaint.
> I didn't test "specifying task runner" and "using structs" separately though.
> 
> If you don't mind, I would like to keep the struct change. Because they are
not
> used in the majority case, it will reduce memory and also initialization cost.
> One example is that ResourceResponseHead has exactly 40 fields, quite some of
> which are classes/structs themselves. It should be more efficient to only
create
> such instances when necessary.

ah, sounds good then!

Powered by Google App Engine
This is Rietveld 408576698