Add a cap of six in-flight requests per host to the ResourceScheduler
commit739d3030848f2cf9f9408d68122b03c813373bef
authoroysteine@chromium.org <oysteine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Sat, 16 Nov 2013 01:51:34 +0000 (16 01:51 +0000)
committeroysteine@chromium.org <oysteine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Sat, 16 Nov 2013 01:51:34 +0000 (16 01:51 +0000)
treec58f6f6467095d62fe005ab3f7546901cacca961
parente23c8ac86e82a3228751a207c2e535a336c703f4
Add a cap of six in-flight requests per host to the ResourceScheduler

There's a cap of 10 delayable in-flight requests already present in the ResourceScheduler, but due to the underlying cap on six connections per host we sometimes don't utilize all ten if they're all for the same host. This CL adds an additional per-host cap, meaning if there's already six in-flight requests going to foo.bar.com, another request to foo.bar.com will be skipped in favour of a later-queued request to foo2.bar.com.

Tests from pmeenan@ suggests this results in an overall increase of onload and Speed Index speed by about 2.5%, and DOM Content Loaded speed by 1.15%.

BUG=319488

Review URL: https://codereview.chromium.org/23620058

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235491 0039d316-1c4b-4281-b951-d872f2087c98
content/browser/loader/resource_scheduler.cc
content/browser/loader/resource_scheduler.h
content/browser/loader/resource_scheduler_unittest.cc
net/base/priority_queue_unittest.cc