Commit b1a7e23a authored by Takashi Toyoshima's avatar Takashi Toyoshima Committed by Commit Bot

ResourceLoadScheduler: Enable the feature by default

This patch enables the ResourceLoadScheduler feature by default.
The feature has been enabled via a field trial flag on beta, dev,
and canary channels, and now it is going to be enabled on stable.

Bug: 729954
Change-Id: I6ae63dffe2fc0d89b036a4ed9c8affe4c7ed12c8
Reviewed-on: https://chromium-review.googlesource.com/1195265Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588818}
parent 00d80f6b
...@@ -367,7 +367,7 @@ const base::Feature kResamplingInputEvents{"ResamplingInputEvents", ...@@ -367,7 +367,7 @@ const base::Feature kResamplingInputEvents{"ResamplingInputEvents",
// Loading Dispatcher v0 support with ResourceLoadScheduler (crbug.com/729954). // Loading Dispatcher v0 support with ResourceLoadScheduler (crbug.com/729954).
const base::Feature kResourceLoadScheduler{"ResourceLoadScheduler", const base::Feature kResourceLoadScheduler{"ResourceLoadScheduler",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
// Run video capture service in the Browser process as opposed to a dedicated // Run video capture service in the Browser process as opposed to a dedicated
// utility process // utility process
......
...@@ -29,7 +29,8 @@ const char kOutstandingLimitForBackgroundMainFrameName[] = "bg_limit"; ...@@ -29,7 +29,8 @@ const char kOutstandingLimitForBackgroundMainFrameName[] = "bg_limit";
const char kOutstandingLimitForBackgroundSubFrameName[] = "bg_sub_limit"; const char kOutstandingLimitForBackgroundSubFrameName[] = "bg_sub_limit";
// Field trial default parameters. // Field trial default parameters.
constexpr size_t kOutstandingLimitForBackgroundFrameDefault = 16u; constexpr size_t kOutstandingLimitForBackgroundMainFrameDefault = 3u;
constexpr size_t kOutstandingLimitForBackgroundSubFrameDefault = 2u;
// Maximum request count that request count metrics assume. // Maximum request count that request count metrics assume.
constexpr base::HistogramBase::Sample kMaximumReportSize10K = 10000; constexpr base::HistogramBase::Sample kMaximumReportSize10K = 10000;
...@@ -94,18 +95,14 @@ size_t GetOutstandingThrottledLimit(FetchContext* context) { ...@@ -94,18 +95,14 @@ size_t GetOutstandingThrottledLimit(FetchContext* context) {
if (!RuntimeEnabledFeatures::ResourceLoadSchedulerEnabled()) if (!RuntimeEnabledFeatures::ResourceLoadSchedulerEnabled())
return ResourceLoadScheduler::kOutstandingUnlimited; return ResourceLoadScheduler::kOutstandingUnlimited;
uint32_t main_frame_limit = GetFieldTrialUint32Param( static size_t main_frame_limit = GetFieldTrialUint32Param(
kResourceLoadThrottlingTrial, kOutstandingLimitForBackgroundMainFrameName, kResourceLoadThrottlingTrial, kOutstandingLimitForBackgroundMainFrameName,
kOutstandingLimitForBackgroundFrameDefault); kOutstandingLimitForBackgroundMainFrameDefault);
if (context->IsMainFrame()) static size_t sub_frame_limit = GetFieldTrialUint32Param(
return main_frame_limit; kResourceLoadThrottlingTrial, kOutstandingLimitForBackgroundSubFrameName,
kOutstandingLimitForBackgroundSubFrameDefault);
// We do not have a fixed default limit for sub-frames, but use the limit for
// the main frame so that it works as how previous versions that haven't return context->IsMainFrame() ? main_frame_limit : sub_frame_limit;
// consider sub-frames' specific limit work.
return GetFieldTrialUint32Param(kResourceLoadThrottlingTrial,
kOutstandingLimitForBackgroundSubFrameName,
main_frame_limit);
} }
int TakeWholeKilobytes(int64_t& bytes) { int TakeWholeKilobytes(int64_t& bytes) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment