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

Side by Side Diff: components/scheduler/child/scheduler_helper.cc

Issue 1243143003: Revert of scheduler: Increase work batch size to 4 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/scheduler/child/scheduler_helper.h" 5 #include "components/scheduler/child/scheduler_helper.h"
6 6
7 #include "base/time/default_tick_clock.h" 7 #include "base/time/default_tick_clock.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "base/trace_event/trace_event_argument.h" 9 #include "base/trace_event/trace_event_argument.h"
10 #include "components/scheduler/child/scheduler_task_runner_delegate.h" 10 #include "components/scheduler/child/scheduler_task_runner_delegate.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 TaskQueueManager::PumpPolicy::AFTER_WAKEUP); 57 TaskQueueManager::PumpPolicy::AFTER_WAKEUP);
58 task_queue_manager_->SetWakeupPolicy( 58 task_queue_manager_->SetWakeupPolicy(
59 QueueId::CONTROL_TASK_AFTER_WAKEUP_QUEUE, 59 QueueId::CONTROL_TASK_AFTER_WAKEUP_QUEUE,
60 TaskQueueManager::WakeupPolicy::DONT_WAKE_OTHER_QUEUES); 60 TaskQueueManager::WakeupPolicy::DONT_WAKE_OTHER_QUEUES);
61 61
62 for (size_t i = 0; i < TASK_QUEUE_COUNT; i++) { 62 for (size_t i = 0; i < TASK_QUEUE_COUNT; i++) {
63 task_queue_manager_->SetQueueName( 63 task_queue_manager_->SetQueueName(
64 i, TaskQueueIdToString(static_cast<QueueId>(i))); 64 i, TaskQueueIdToString(static_cast<QueueId>(i)));
65 } 65 }
66 66
67 task_queue_manager_->SetWorkBatchSize(4); 67 // TODO(skyostil): Increase this to 4 (crbug.com/444764).
68 task_queue_manager_->SetWorkBatchSize(1);
68 69
69 main_task_runner_->SetDefaultTaskRunner( 70 main_task_runner_->SetDefaultTaskRunner(
70 task_queue_manager_->TaskRunnerForQueue(QueueId::DEFAULT_TASK_QUEUE)); 71 task_queue_manager_->TaskRunnerForQueue(QueueId::DEFAULT_TASK_QUEUE));
71 } 72 }
72 73
73 SchedulerHelper::~SchedulerHelper() { 74 SchedulerHelper::~SchedulerHelper() {
74 Shutdown(); 75 Shutdown();
75 } 76 }
76 77
77 void SchedulerHelper::Shutdown() { 78 void SchedulerHelper::Shutdown() {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 218 }
218 219
219 void SchedulerHelper::RemoveTaskObserver( 220 void SchedulerHelper::RemoveTaskObserver(
220 base::MessageLoop::TaskObserver* task_observer) { 221 base::MessageLoop::TaskObserver* task_observer) {
221 CheckOnValidThread(); 222 CheckOnValidThread();
222 if (task_queue_manager_) 223 if (task_queue_manager_)
223 task_queue_manager_->RemoveTaskObserver(task_observer); 224 task_queue_manager_->RemoveTaskObserver(task_observer);
224 } 225 }
225 226
226 } // namespace scheduler 227 } // namespace scheduler
OLDNEW
« 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