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

Issue 2488323002: Cache net::HostPortPair in ResourceScheduler::ScheduledResourceRequest (Closed)

Created:
4 years, 1 month ago by Charlie Harrison
Modified:
4 years, 1 month ago
CC:
chromium-reviews, loading-reviews_chromium.org, jam, darin-cc_chromium.org, Randy Smith (Not in Mondays), mmenke
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Cache net::HostPortPair in ResourceScheduler::ScheduledResourceRequest When loading http://cr.kungfoo.net/loading/1000spacers/ with resources coming from the disk cache, responding to priority changes takes up ~26% of the CPU time spent on the IO thread. This change moves that to ~7.7% (Linux). The time is saved in EffectiveIntPort, which must do a lookup for the scheme in a set (DoIsStandard). There is a memory overhead, but since we are only storing host and port this should not be too bad. BUG=664174 Committed: https://crrev.com/8c2a381d0adbb6d791172cee1b311c1ad4f31e8e Cr-Commit-Position: refs/heads/master@{#431339}

Patch Set 1 #

Patch Set 2 : make it const #

Total comments: 7

Patch Set 3 : mmenke@ review #

Patch Set 4 : +1 const #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -5 lines) Patch
M content/browser/loader/resource_scheduler.cc View 1 2 3 5 chunks +6 lines, -5 lines 0 comments Download

Messages

Total messages: 22 (12 generated)
Charlie Harrison
Matt, what do you think about this? I know ResourceScheduler is going away eventually but ...
4 years, 1 month ago (2016-11-10 18:46:15 UTC) #6
Charlie Harrison
Oh I would also be happy with doing the strategy in https://codereview.chromium.org/2492753002/ which gives us ...
4 years, 1 month ago (2016-11-10 18:49:30 UTC) #7
Randy Smith (Not in Mondays)
You didn't ask, but LGTM from me :-}.
4 years, 1 month ago (2016-11-10 18:50:02 UTC) #9
mmenke
LGTM, modulo comments. https://codereview.chromium.org/2488323002/diff/20001/content/browser/loader/resource_scheduler.cc File content/browser/loader/resource_scheduler.cc (right): https://codereview.chromium.org/2488323002/diff/20001/content/browser/loader/resource_scheduler.cc#newcode247 content/browser/loader/resource_scheduler.cc:247: const net::HostPortPair host_port_pair() { return host_port_pair_; ...
4 years, 1 month ago (2016-11-10 19:11:37 UTC) #10
mmenke
https://codereview.chromium.org/2488323002/diff/20001/content/browser/loader/resource_scheduler.cc File content/browser/loader/resource_scheduler.cc (right): https://codereview.chromium.org/2488323002/diff/20001/content/browser/loader/resource_scheduler.cc#newcode247 content/browser/loader/resource_scheduler.cc:247: const net::HostPortPair host_port_pair() { return host_port_pair_; } Also +1 ...
4 years, 1 month ago (2016-11-10 19:15:26 UTC) #11
Charlie Harrison
Thanks https://codereview.chromium.org/2488323002/diff/20001/content/browser/loader/resource_scheduler.cc File content/browser/loader/resource_scheduler.cc (right): https://codereview.chromium.org/2488323002/diff/20001/content/browser/loader/resource_scheduler.cc#newcode247 content/browser/loader/resource_scheduler.cc:247: const net::HostPortPair host_port_pair() { return host_port_pair_; } On ...
4 years, 1 month ago (2016-11-10 19:15:41 UTC) #12
Charlie Harrison
hehe, I was too fast https://codereview.chromium.org/2488323002/diff/20001/content/browser/loader/resource_scheduler.cc File content/browser/loader/resource_scheduler.cc (right): https://codereview.chromium.org/2488323002/diff/20001/content/browser/loader/resource_scheduler.cc#newcode247 content/browser/loader/resource_scheduler.cc:247: const net::HostPortPair host_port_pair() { ...
4 years, 1 month ago (2016-11-10 19:17:10 UTC) #16
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/2488323002/60001
4 years, 1 month ago (2016-11-10 19:18:12 UTC) #19
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 1 month ago (2016-11-10 20:25:16 UTC) #20
commit-bot: I haz the power
4 years, 1 month ago (2016-11-10 20:35:58 UTC) #22
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/8c2a381d0adbb6d791172cee1b311c1ad4f31e8e
Cr-Commit-Position: refs/heads/master@{#431339}

Powered by Google App Engine
This is Rietveld 408576698