diff options
author | skyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-27 22:02:16 +0000 |
---|---|---|
committer | skyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-27 22:02:16 +0000 |
commit | 8c8cc1488454c07aa07c6bb11c4ba84463bcca7d (patch) | |
tree | 1e4683bca696e32ee9382e6bf2d6343578fe7b5d /cc/worker_pool.cc | |
parent | fb2a69925e923421fd245a403bb5689d6e7901f9 (diff) | |
download | chromium_src-8c8cc1488454c07aa07c6bb11c4ba84463bcca7d.zip chromium_src-8c8cc1488454c07aa07c6bb11c4ba84463bcca7d.tar.gz chromium_src-8c8cc1488454c07aa07c6bb11c4ba84463bcca7d.tar.bz2 |
cc: Check for cheap task completion sooner
Instead of using the normal 6 ms period to poll for cheap task
completion, do the check immediately after running a batch of cheap
tasks. This improves cheap task completion latency.
In order to avoid disturbing the scheduling of normal task completion,
this optimization is only performed if there are no pending non-cheap
tasks.
BUG=178441
Review URL: https://chromiumcodereview.appspot.com/12321140
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185051 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/worker_pool.cc')
-rw-r--r-- | cc/worker_pool.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cc/worker_pool.cc b/cc/worker_pool.cc index 5e7c681..77e6139 100644 --- a/cc/worker_pool.cc +++ b/cc/worker_pool.cc @@ -391,7 +391,10 @@ void WorkerPool::RunCheapTasks() { pending_cheap_tasks_.take_front(); PostTask(task.Pass(), false); } + run_cheap_tasks_pending_ = false; + if (base::subtle::Acquire_Load(&pending_task_count_) == 0) + OnIdle(); } } // namespace cc |