New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 621128 link

Starred by 9 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature

Blocked on:
issue 793069
issue 621125

Blocking:
issue 588745



Sign in to add a comment

Consider scheduling of background tasks such as TopSitesBackend::UpdateTopSites.

Project Member Reported by vmi...@chromium.org, Jun 17 2016

Issue description

In the thread_times.key_silk_cases benchmark,  TopSitesBackend::UpdateTopSites shows up as a ~42ms task running periodically.  It may occur in any page content life-cycle phase.  See Issue 588745.

It would be good to think about how we could better schedule these browser tasks depending on the content lifecycle (loading, animating, idle, etc.)
 

Comment 1 by vmi...@chromium.org, Jun 17 2016

Blockedon: 621125
Cc: gab@chromium.org
Gab, any plans for an idle task class in the executor? Something like this would fit in nicely. For example we might want to wait until the user has been idle for a few seconds before running things like this.

Comment 3 by gab@chromium.org, Jun 20 2016

Cc: robliao@chromium.org fdoray@chromium.org
Yes, TaskTraits.WithPriority(TaskPriority::BACKGROUND) in base/task_scheduler. These will run on a thread running at background (I/O, CPU, and memory) priority at the OS-level (i.e. will essentially be desched until the kernel decides it has time to run it.

Related:  issue 223430 .

The TaskScheduler will be ready to accept work in Q3 and this could be a good first candidate :-).
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2def4f5e4c629472298fa679b9803d382960a807

commit 2def4f5e4c629472298fa679b9803d382960a807
Author: vmiura <vmiura@chromium.org>
Date: Mon Jul 25 20:19:41 2016

telemetry: Disable top sites in thread_times benchmarks.

Top sites update tasks add noise to these benchmarks.  Disabling
until tasks are converted to use the TaskScheduler APIs.

BUG=588745
BUG=621128

Review-Url: https://codereview.chromium.org/2168313004
Cr-Commit-Position: refs/heads/master@{#407560}

[modify] https://crrev.com/2def4f5e4c629472298fa679b9803d382960a807/tools/perf/benchmarks/silk_flags.py
[modify] https://crrev.com/2def4f5e4c629472298fa679b9803d382960a807/tools/perf/benchmarks/thread_times.py

Comment 5 by gab@chromium.org, Nov 7 2016

Components: Internals>TaskScheduler
Project Member

Comment 6 by sheriffbot@chromium.org, Nov 8 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 7 by treib@chromium.org, Nov 8 2017

Owner: chengx@chromium.org
Status: Assigned (was: Untriaged)
I think we can consider this fixed as of https://chromium-review.googlesource.com/c/chromium/src/+/678115. Over to the author to verify and close if appropriate :)
This code is converted to TaskScheduler APIs now. The problem is that one task runner is used for multiple tasks with different priorities. It seems that there is a potential for improvement here with SequenceScheduler.
I did make several improvements on TopSitesBackend::UpdateTopSites. 

One is to remove polling in the topsites update (see CL as treib@ mentioned in comment 7). Thanks to this fix, UpdateTopSites is not "running periodically" anymore which is mentioned in the bug description.

Another improvement is to optimize UpdateTopSites so each run takes less time. see crbug/763103.

The issue that gab@ and altimin@ mentioned is that TopSitesBackend::UpdateTopSites and some other tasks are currently running on db_task_runner_ which has a USER_VISIBLE priority. However, we want UpdateTopSites to run in background. Another related bug is crbug/223430.

Comment 10 by gab@chromium.org, Apr 12 2018

Cc: hua...@chromium.org sky@chromium.org chengx@chromium.org
 Issue 223430  has been merged into this issue.

Comment 11 by gab@chromium.org, Apr 12 2018

Blocking: 588745

Comment 12 by treib@chromium.org, Apr 18 2018

Cc: -treib@chromium.org
Blockedon: 875304
Labels: -Pri-3 Pri-2
Blockedon: -875304 793069
Cc: -chengx@chromium.org -gab@chromium.org
Owner: gab@chromium.org

Sign in to add a comment