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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 2855673002: Tweak client-side default scheduler configs to match latest server configs. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | ios/web/app/web_main_loop.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 FOREGROUND, 399 FOREGROUND,
400 FOREGROUND_BLOCKING, 400 FOREGROUND_BLOCKING,
401 WORKER_POOL_COUNT // Always last. 401 WORKER_POOL_COUNT // Always last.
402 }; 402 };
403 403
404 std::unique_ptr<base::TaskScheduler::InitParams> 404 std::unique_ptr<base::TaskScheduler::InitParams>
405 GetDefaultTaskSchedulerInitParams() { 405 GetDefaultTaskSchedulerInitParams() {
406 using StandbyThreadPolicy = 406 using StandbyThreadPolicy =
407 base::SchedulerWorkerPoolParams::StandbyThreadPolicy; 407 base::SchedulerWorkerPoolParams::StandbyThreadPolicy;
408 #if defined(OS_ANDROID) 408 #if defined(OS_ANDROID)
409 // Mobile config, for iOS see ios/web/app/web_main_loop.cc.
409 return base::MakeUnique<base::TaskScheduler::InitParams>( 410 return base::MakeUnique<base::TaskScheduler::InitParams>(
410 base::SchedulerWorkerPoolParams( 411 base::SchedulerWorkerPoolParams(
411 StandbyThreadPolicy::ONE, 412 StandbyThreadPolicy::ONE,
412 base::RecommendedMaxNumberOfThreadsInPool(2, 8, 0.1, 0), 413 base::RecommendedMaxNumberOfThreadsInPool(2, 8, 0.1, 0),
413 base::TimeDelta::FromSeconds(30)), 414 base::TimeDelta::FromSeconds(30)),
414 base::SchedulerWorkerPoolParams( 415 base::SchedulerWorkerPoolParams(
415 StandbyThreadPolicy::ONE, 416 StandbyThreadPolicy::ONE,
416 base::RecommendedMaxNumberOfThreadsInPool(2, 8, 0.1, 0), 417 base::RecommendedMaxNumberOfThreadsInPool(2, 8, 0.1, 0),
417 base::TimeDelta::FromSeconds(30)), 418 base::TimeDelta::FromSeconds(30)),
418 base::SchedulerWorkerPoolParams( 419 base::SchedulerWorkerPoolParams(
419 StandbyThreadPolicy::ONE, 420 StandbyThreadPolicy::ONE,
420 base::RecommendedMaxNumberOfThreadsInPool(3, 8, 0.3, 0), 421 base::RecommendedMaxNumberOfThreadsInPool(3, 8, 0.3, 0),
421 base::TimeDelta::FromSeconds(30)), 422 base::TimeDelta::FromSeconds(30)),
422 base::SchedulerWorkerPoolParams( 423 base::SchedulerWorkerPoolParams(
423 StandbyThreadPolicy::ONE, 424 StandbyThreadPolicy::ONE,
424 base::RecommendedMaxNumberOfThreadsInPool(3, 8, 0.3, 0), 425 base::RecommendedMaxNumberOfThreadsInPool(3, 8, 0.3, 0),
425 base::TimeDelta::FromSeconds(30))); 426 base::TimeDelta::FromSeconds(60)));
426 #else 427 #else
428 // Desktop config.
427 return base::MakeUnique<base::TaskScheduler::InitParams>( 429 return base::MakeUnique<base::TaskScheduler::InitParams>(
428 base::SchedulerWorkerPoolParams( 430 base::SchedulerWorkerPoolParams(
429 StandbyThreadPolicy::ONE, 431 StandbyThreadPolicy::ONE,
430 base::RecommendedMaxNumberOfThreadsInPool(3, 8, 0.1, 0), 432 base::RecommendedMaxNumberOfThreadsInPool(3, 8, 0.1, 0),
431 base::TimeDelta::FromSeconds(30)), 433 base::TimeDelta::FromSeconds(30)),
432 base::SchedulerWorkerPoolParams( 434 base::SchedulerWorkerPoolParams(
433 StandbyThreadPolicy::ONE, 435 StandbyThreadPolicy::ONE,
434 base::RecommendedMaxNumberOfThreadsInPool(3, 8, 0.1, 0), 436 base::RecommendedMaxNumberOfThreadsInPool(3, 8, 0.1, 0),
435 base::TimeDelta::FromSeconds(30)), 437 base::TimeDelta::FromSeconds(40)),
436 base::SchedulerWorkerPoolParams( 438 base::SchedulerWorkerPoolParams(
437 StandbyThreadPolicy::ONE, 439 StandbyThreadPolicy::ONE,
438 base::RecommendedMaxNumberOfThreadsInPool(8, 32, 0.3, 0), 440 base::RecommendedMaxNumberOfThreadsInPool(8, 32, 0.3, 0),
439 base::TimeDelta::FromSeconds(30)), 441 base::TimeDelta::FromSeconds(30)),
440 // Tasks posted to SequencedWorkerPool or BrowserThreadImpl may be 442 // Tasks posted to SequencedWorkerPool or BrowserThreadImpl may be
441 // redirected to this pool. Since COM STA is initialized in these 443 // redirected to this pool. Since COM STA is initialized in these
442 // environments, it must also be initialized in this pool. 444 // environments, it must also be initialized in this pool.
443 base::SchedulerWorkerPoolParams( 445 base::SchedulerWorkerPoolParams(
444 StandbyThreadPolicy::ONE, 446 StandbyThreadPolicy::ONE,
445 base::RecommendedMaxNumberOfThreadsInPool(8, 32, 0.3, 0), 447 base::RecommendedMaxNumberOfThreadsInPool(8, 32, 0.3, 0),
446 base::TimeDelta::FromSeconds(30), 448 base::TimeDelta::FromSeconds(60),
447 base::SchedulerBackwardCompatibility::INIT_COM_STA)); 449 base::SchedulerBackwardCompatibility::INIT_COM_STA));
448 #endif 450 #endif
449 } 451 }
450 452
451 } // namespace 453 } // namespace
452 454
453 #if defined(USE_X11) && !defined(OS_CHROMEOS) 455 #if defined(USE_X11) && !defined(OS_CHROMEOS)
454 namespace internal { 456 namespace internal {
455 457
456 // Forwards GPUInfo updates to ui::XVisualManager 458 // Forwards GPUInfo updates to ui::XVisualManager
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1766 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), 1768 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
1767 MediaInternals::GetInstance()); 1769 MediaInternals::GetInstance());
1768 } 1770 }
1769 CHECK(audio_manager_); 1771 CHECK(audio_manager_);
1770 1772
1771 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); 1773 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get());
1772 CHECK(audio_system_); 1774 CHECK(audio_system_);
1773 } 1775 }
1774 1776
1775 } // namespace content 1777 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ios/web/app/web_main_loop.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698