summaryrefslogtreecommitdiffstats
path: root/content/browser/loader/resource_scheduler.h
diff options
context:
space:
mode:
authorhong.zheng@intel.com <hong.zheng@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-25 08:55:49 +0000
committerhong.zheng@intel.com <hong.zheng@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-25 08:55:49 +0000
commite56975691186fba63a20fa73dc0b8d245c86ca07 (patch)
treea1b09f36c76df9a71b672c7e6a72fae66fdc49af /content/browser/loader/resource_scheduler.h
parentf8881a71968e1b5f1af981a3196d43e25217c312 (diff)
downloadchromium_src-e56975691186fba63a20fa73dc0b8d245c86ca07.zip
chromium_src-e56975691186fba63a20fa73dc0b8d245c86ca07.tar.gz
chromium_src-e56975691186fba63a20fa73dc0b8d245c86ca07.tar.bz2
Cache total_delayable_count for in_flight_requests in ResourceScheduler
In ResourceScheduler::GetNumDelayableRequestsInFlight, total_delayable_count has no relation to active_request_host, so we do not need to compute it for each request. The patch can boost BrowsingBench workload >5% performance. BUG=347454 Review URL: https://codereview.chromium.org/180843016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/loader/resource_scheduler.h')
-rw-r--r--content/browser/loader/resource_scheduler.h28
1 files changed, 1 insertions, 27 deletions
diff --git a/content/browser/loader/resource_scheduler.h b/content/browser/loader/resource_scheduler.h
index cd8f054..0e918f1 100644
--- a/content/browser/loader/resource_scheduler.h
+++ b/content/browser/loader/resource_scheduler.h
@@ -92,7 +92,7 @@ class CONTENT_EXPORT ResourceScheduler : public base::NonThreadSafe {
bool operator()(const ScheduledResourceRequest* a,
const ScheduledResourceRequest* b) const;
};
- struct Client;
+ class Client;
typedef int64 ClientId;
typedef std::map<ClientId, Client*> ClientMap;
@@ -101,9 +101,6 @@ class CONTENT_EXPORT ResourceScheduler : public base::NonThreadSafe {
// Called when a ScheduledResourceRequest is destroyed.
void RemoveRequest(ScheduledResourceRequest* request);
- // Unthrottles the |request| and adds it to |client|.
- void StartRequest(ScheduledResourceRequest* request, Client* client);
-
// Update the queue position for |request|, possibly causing it to start
// loading.
//
@@ -114,29 +111,6 @@ class CONTENT_EXPORT ResourceScheduler : public base::NonThreadSafe {
net::RequestPriority new_priority,
int intra_priority_value);
- // Attempts to load any pending requests in |client|, based on the
- // results of ShouldStartRequest().
- void LoadAnyStartablePendingRequests(Client* client);
-
- // Returns the number of requests with priority < LOW that are currently in
- // flight.
- void GetNumDelayableRequestsInFlight(
- Client* client,
- const net::HostPortPair& active_request_host,
- size_t* total_delayable,
- size_t* total_for_active_host) const;
-
- enum ShouldStartReqResult {
- DO_NOT_START_REQUEST_AND_STOP_SEARCHING = -2,
- DO_NOT_START_REQUEST_AND_KEEP_SEARCHING = -1,
- START_REQUEST = 1,
- };
-
- // Returns true if the request should start. This is the core scheduling
- // algorithm.
- ShouldStartReqResult ShouldStartRequest(ScheduledResourceRequest* request,
- Client* client) const;
-
// Returns the client ID for the given |child_id| and |route_id| combo.
ClientId MakeClientId(int child_id, int route_id);