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

Unified Diff: content/renderer/render_process_impl.cc

Issue 2681523002: Increase the number of TaskScheduler foreground threads in renderers. (Closed)
Patch Set: CR gab #14 Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_process_impl.cc
diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc
index db042b903f1748a8b4ff9fbb4e92f0b3bb048555..824306e77ba5b22ced1b19abc68b8f996706c0b6 100644
--- a/content/renderer/render_process_impl.cc
+++ b/content/renderer/render_process_impl.cc
@@ -14,6 +14,7 @@
#include <stddef.h>
+#include <algorithm>
#include <vector>
#include "base/bind.h"
@@ -87,13 +88,10 @@ GetDefaultSchedulerWorkerPoolParams() {
using StandbyThreadPolicy =
base::SchedulerWorkerPoolParams::StandbyThreadPolicy;
using ThreadPriority = base::ThreadPriority;
- constexpr size_t kMaxNumThreadsInBackgroundPool = 1;
- constexpr size_t kMaxNumThreadsInBackgroundFileIOPool = 1;
+ constexpr int kMaxNumThreadsInBackgroundPool = 1;
+ constexpr int kMaxNumThreadsInBackgroundFileIOPool = 1;
constexpr int kMaxNumThreadsInForegroundPoolLowerBound = 2;
- constexpr int kMaxNumThreadsInForegroundPoolUpperBound = 4;
- constexpr double kMaxNumThreadsInForegroundPoolCoresMultiplier = 1;
- constexpr int kMaxNumThreadsInForegroundPoolOffset = 0;
- constexpr size_t kMaxNumThreadsInForegroundFileIOPool = 1;
+ constexpr int kMaxNumThreadsInForegroundFileIOPool = 1;
constexpr auto kSuggestedReclaimTime = base::TimeDelta::FromSeconds(30);
std::vector<base::SchedulerWorkerPoolParams> params_vector;
@@ -107,11 +105,8 @@ GetDefaultSchedulerWorkerPoolParams() {
kSuggestedReclaimTime);
params_vector.emplace_back("RendererForeground", ThreadPriority::NORMAL,
StandbyThreadPolicy::LAZY,
- base::RecommendedMaxNumberOfThreadsInPool(
- kMaxNumThreadsInForegroundPoolLowerBound,
- kMaxNumThreadsInForegroundPoolUpperBound,
- kMaxNumThreadsInForegroundPoolCoresMultiplier,
- kMaxNumThreadsInForegroundPoolOffset),
+ std::max(kMaxNumThreadsInForegroundPoolLowerBound,
+ base::SysInfo::NumberOfProcessors()),
kSuggestedReclaimTime);
params_vector.emplace_back("RendererForegroundFileIO", ThreadPriority::NORMAL,
StandbyThreadPolicy::LAZY,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698