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

Unified Diff: tools/gn/scheduler.cc

Issue 1957483004: GN: Don't import a file more than once. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 4 years, 7 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 | « tools/gn/import_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/scheduler.cc
diff --git a/tools/gn/scheduler.cc b/tools/gn/scheduler.cc
index a711df1cf02b41ed43cfff7b1bc1e5eaccc67da5..b2e2a006b96ebe69fba51f4a93e74e78f4bbce24 100644
--- a/tools/gn/scheduler.cc
+++ b/tools/gn/scheduler.cc
@@ -54,10 +54,13 @@ int GetThreadCount() {
//
// One less worker thread than the number of physical CPUs seems to be a
// good value, both theoretically and experimentally. But always use at
- // least three workers to prevent us from being too sensitive to I/O latency
+ // least some workers to prevent us from being too sensitive to I/O latency
// on low-end systems.
+ //
+ // The minimum thread count is based on measuring the optimal threads for the
+ // Chrome build on a several-year-old 4-core MacBook.
int num_cores = GetCPUCount() / 2; // Almost all CPUs now are hyperthreaded.
- return std::max(num_cores - 1, 3);
+ return std::max(num_cores - 1, 8);
}
} // namespace
« no previous file with comments | « tools/gn/import_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698