OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/loader/resource_scheduler.h" | 5 #include "content/browser/loader/resource_scheduler.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 namespace content { | 33 namespace content { |
34 | 34 |
35 namespace { | 35 namespace { |
36 | 36 |
37 // When kPrioritySupportedRequestsDelayable is enabled, requests for | 37 // When kPrioritySupportedRequestsDelayable is enabled, requests for |
38 // H2/QUIC/SPDY resources can be delayed by the ResourceScheduler just as | 38 // H2/QUIC/SPDY resources can be delayed by the ResourceScheduler just as |
39 // HTTP/1.1 resources are. Disabling this appears to have negative performance | 39 // HTTP/1.1 resources are. Disabling this appears to have negative performance |
40 // impact, see https://crbug.com/655585. | 40 // impact, see https://crbug.com/655585. |
41 const base::Feature kPrioritySupportedRequestsDelayable{ | 41 const base::Feature kPrioritySupportedRequestsDelayable{ |
42 "PrioritySupportedRequestsDelayable", base::FEATURE_DISABLED_BY_DEFAULT}; | 42 "PrioritySupportedRequestsDelayable", base::FEATURE_ENABLED_BY_DEFAULT}; |
43 | 43 |
44 // In the event that many resource requests are started quickly, this feature | 44 // In the event that many resource requests are started quickly, this feature |
45 // will periodically yield (e.g., delaying starting of requests) by posting a | 45 // will periodically yield (e.g., delaying starting of requests) by posting a |
46 // task and waiting for the task to run to resume. This allows other | 46 // task and waiting for the task to run to resume. This allows other |
47 // operations that rely on the IO thread (e.g., already running network | 47 // operations that rely on the IO thread (e.g., already running network |
48 // requests) to make progress. | 48 // requests) to make progress. |
49 const base::Feature kNetworkSchedulerYielding{ | 49 const base::Feature kNetworkSchedulerYielding{ |
50 "NetworkSchedulerYielding", base::FEATURE_DISABLED_BY_DEFAULT}; | 50 "NetworkSchedulerYielding", base::FEATURE_DISABLED_BY_DEFAULT}; |
51 const char kMaxRequestsBeforeYieldingParam[] = "MaxRequestsBeforeYieldingParam"; | 51 const char kMaxRequestsBeforeYieldingParam[] = "MaxRequestsBeforeYieldingParam"; |
52 const int kMaxRequestsBeforeYieldingDefault = 5; | 52 const int kMaxRequestsBeforeYieldingDefault = 5; |
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 client->ReprioritizeRequest(scheduled_resource_request, old_priority_params, | 1079 client->ReprioritizeRequest(scheduled_resource_request, old_priority_params, |
1080 new_priority_params); | 1080 new_priority_params); |
1081 } | 1081 } |
1082 | 1082 |
1083 ResourceScheduler::ClientId ResourceScheduler::MakeClientId( | 1083 ResourceScheduler::ClientId ResourceScheduler::MakeClientId( |
1084 int child_id, int route_id) { | 1084 int child_id, int route_id) { |
1085 return (static_cast<ResourceScheduler::ClientId>(child_id) << 32) | route_id; | 1085 return (static_cast<ResourceScheduler::ClientId>(child_id) << 32) | route_id; |
1086 } | 1086 } |
1087 | 1087 |
1088 } // namespace content | 1088 } // namespace content |
OLD | NEW |