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

Issue 672479 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug

Blocked on:
issue 676308

Blocking:
issue 665873
issue 668074
issue 675903



Sign in to add a comment

[Tracking bug] Introduce soft background fetches for remote content suggestions

Project Member Reported by jkrcal@chromium.org, Dec 8 2016

Issue description

Currently, background fetches are only performed via GCM Scheduler on Android. Such fetches happen independently of the fact whether Chrome is running or not (is started, when not running). 

We should introduce background fetches that happen only when Chrome is running. There are several advantages:
 - reacts to _current_ usage of Chrome and thus prioritizes users that are currently active;
 - is much more flexible than GCM as it can react to Chrome-internal events;
 - does not start up Chrome (causing slowdown and battery strain).

The action plan is the following:
 1) Refactor scheduling out of RemoteSuggestionsProvider into a new scheduler class.

 2) Introduce soft fetches API in the scheduler, and make use of them by implementing a repetitive background timer triggering soft fetches (including random jitter of ~30 minutes).

 3) Add other hooks to trigger soft fetches:
   - Chrome startup (with the intent to open the browser window; even on cellular; after a small random delay);
   - opening a NTP (even on cellular; immediately);
   - getting online (only over wifi; after a small random delay);
 (maybe allow a remotely configurable blacklist of triggering points so that we are in control)

 4) Add an experiment to update the UI before the user scrolls-below-the-fold

 5) Add metrics to enable assessing the improvement:
   - age of impressed snippets as a difference of impression time and _fetch_ time;
   - track on startup whether a soft fetch has been performed or not;
   - allow to track how many soft fetches per day have been performed.
 
Description: Show this description
Blocking: 665873
Labels: M-57 zine-fetch-strategy-v1 zine-triaged
Blocking: 668074

Comment 5 by jkrcal@chromium.org, Dec 20 2016

Blocking: 675903

Comment 6 by jkrcal@chromium.org, Dec 20 2016

The hook when opening Chrome makes a lot of sense (compared to just the hook when opening a new NTP) because in >77% of Chrome mobile startups some tab is open.

https://uma.googleplex.com/p/chrome/histograms/?endDate=20161218&dayCount=28&histograms=Tabs.CountAtStartup&fixupData=true&showMax=true&filters=platform%2Ceq%2CA%2Cchannel%2Ceq%2C4%2Cisofficial%2Ceq%2CTrue&implicitFilters=isofficial

Comment 7 by jkrcal@chromium.org, Dec 21 2016

Blockedon: 676308
Project Member

Comment 8 by bugdroid1@chromium.org, Dec 21 2016

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

commit 093410c469a8105341cdf0062e65a5c5ac0ef4b8
Author: jkrcal <jkrcal@chromium.org>
Date: Wed Dec 21 16:13:55 2016

[NTP Snippets] Refactor background scheduling for remote suggestions

This CL splits off scheduling functionality from
RemoteSuggestionsProvider into a separate class.

RemoteSuggestionsProvider is a complex class. This is to prepare for
further work on soft-scheduled updates (wich makes scheduling slightly
more complex).

The CL also renames the getter for RemoteSuggestionsProvider as it would anyway touch almost all of its callers.

BUG= 672479 

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

[modify] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java
[modify] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/chrome/browser/android/ntp/ntp_snippets_bridge.cc
[modify] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/chrome/browser/android/ntp/ntp_snippets_bridge.h
[modify] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/chrome/browser/android/ntp/ntp_snippets_launcher.h
[modify] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc
[modify] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/chrome/browser/prefs/browser_prefs.cc
[modify] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/chrome/browser/ui/webui/snippets_internals_message_handler.cc
[modify] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/components/ntp_snippets/BUILD.gn
[modify] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/components/ntp_snippets/content_suggestions_provider.h
[modify] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/components/ntp_snippets/content_suggestions_service.cc
[modify] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/components/ntp_snippets/content_suggestions_service.h
[delete] https://crrev.com/6fce596dd212d98fba4603f1806653809fb85c30/components/ntp_snippets/remote/ntp_snippets_scheduler.h
[add] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/components/ntp_snippets/remote/persistent_scheduler.h
[delete] https://crrev.com/6fce596dd212d98fba4603f1806653809fb85c30/components/ntp_snippets/remote/remote_suggestions_hard_scheduler.h
[modify] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/components/ntp_snippets/remote/remote_suggestions_provider.cc
[modify] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/components/ntp_snippets/remote/remote_suggestions_provider.h
[add] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc
[add] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/components/ntp_snippets/remote/remote_suggestions_provider_impl.h
[rename] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc
[modify] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/components/ntp_snippets/remote/remote_suggestions_scheduler.h
[add] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/components/ntp_snippets/remote/scheduling_remote_suggestions_provider.cc
[add] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/components/ntp_snippets/remote/scheduling_remote_suggestions_provider.h
[add] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/components/ntp_snippets/remote/scheduling_remote_suggestions_provider_unittest.cc
[modify] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory.cc
[modify] https://crrev.com/093410c469a8105341cdf0062e65a5c5ac0ef4b8/ios/chrome/browser/prefs/browser_prefs.mm

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 21 2016

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

commit d28961791eb33b87e6bce4c092bd287bd932eb0e
Author: jkrcal <jkrcal@chromium.org>
Date: Wed Dec 21 17:12:13 2016

[Remote suggestions] Interface for additional triggers for the scheduler

This CL adds new methods to call on additional fetching triggers. The
actual triggers and fetching will be implemented in later CLs.

BUG= 672479 

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

[modify] https://crrev.com/d28961791eb33b87e6bce4c092bd287bd932eb0e/components/ntp_snippets/remote/remote_suggestions_scheduler.h
[modify] https://crrev.com/d28961791eb33b87e6bce4c092bd287bd932eb0e/components/ntp_snippets/remote/scheduling_remote_suggestions_provider.cc
[modify] https://crrev.com/d28961791eb33b87e6bce4c092bd287bd932eb0e/components/ntp_snippets/remote/scheduling_remote_suggestions_provider.h

Project Member

Comment 10 by bugdroid1@chromium.org, Jan 5 2017

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

commit 4d65d6bf235aa53c08304ebae6d39837e694d73f
Author: jkrcal <jkrcal@chromium.org>
Date: Thu Jan 05 10:43:06 2017

[Background fetching] Background fetching when opening an NTP.

This CL implements the most prominent soft background fetching trigger.
Whenever a new NTP is opened, we check whether a pre-specified time has
elapsed since the last successful fetch (+ a random jitter). Both the
minimum fetching frequency and the random jitter are controlled by
variation parameters.

BUG= 672479 

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

[modify] https://crrev.com/4d65d6bf235aa53c08304ebae6d39837e694d73f/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc
[modify] https://crrev.com/4d65d6bf235aa53c08304ebae6d39837e694d73f/components/ntp_snippets/pref_names.cc
[modify] https://crrev.com/4d65d6bf235aa53c08304ebae6d39837e694d73f/components/ntp_snippets/pref_names.h
[modify] https://crrev.com/4d65d6bf235aa53c08304ebae6d39837e694d73f/components/ntp_snippets/remote/scheduling_remote_suggestions_provider.cc
[modify] https://crrev.com/4d65d6bf235aa53c08304ebae6d39837e694d73f/components/ntp_snippets/remote/scheduling_remote_suggestions_provider.h
[modify] https://crrev.com/4d65d6bf235aa53c08304ebae6d39837e694d73f/components/ntp_snippets/remote/scheduling_remote_suggestions_provider_unittest.cc
[modify] https://crrev.com/4d65d6bf235aa53c08304ebae6d39837e694d73f/ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Jan 12 2017

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

commit ffa982507bece3662d3b48dd73f8b1c1b85999f2
Author: jkrcal <jkrcal@chromium.org>
Date: Thu Jan 12 17:13:50 2017

[Background fetching] Configure and report fetching triggers

This CL enables configuring which trigger types result in a background
fetch. The default configuration can be overridden by a variation
parameter. It also reports the trigger type of each fetch to UMA.

Additionally, this CL enables two additional trigger types that were
previously inactive (Chrome cold start / Chrome foregrounding).

BUG= 672479 

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

[modify] https://crrev.com/ffa982507bece3662d3b48dd73f8b1c1b85999f2/components/ntp_snippets/remote/scheduling_remote_suggestions_provider.cc
[modify] https://crrev.com/ffa982507bece3662d3b48dd73f8b1c1b85999f2/components/ntp_snippets/remote/scheduling_remote_suggestions_provider.h
[modify] https://crrev.com/ffa982507bece3662d3b48dd73f8b1c1b85999f2/components/ntp_snippets/remote/scheduling_remote_suggestions_provider_unittest.cc
[modify] https://crrev.com/ffa982507bece3662d3b48dd73f8b1c1b85999f2/tools/metrics/histograms/histograms.xml

Status: Fixed (was: Started)
Will document what is implemented in the design doc during this week.
Project Member

Comment 13 by bugdroid1@chromium.org, Mar 20 2017

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

commit 6df27f155b2acc03d205a0d37edca09459cca69c
Author: jkrcal <jkrcal@chromium.org>
Date: Mon Mar 20 17:56:58 2017

[Article suggestions] Add a test field trial config

This CL reflects the 98% group in the stable config for M57.

BUG= 672479 

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

[modify] https://crrev.com/6df27f155b2acc03d205a0d37edca09459cca69c/testing/variations/fieldtrial_testing_config.json

Project Member

Comment 14 by bugdroid1@chromium.org, Apr 13 2017

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

commit e24cd6767ef345d4b2865d31218c1e7be14de039
Author: jkrcal <jkrcal@chromium.org>
Date: Thu Apr 13 15:24:44 2017

[Remote scheduler] Adapt the M59 defaults to M57 Stable results

This CL adapts the M59 defaults for remote suggestions scheduler to
observations from M57 soft fetches rollout. It also, targetting EM, sets
cellular soft interval values to 2x of corresponding wifi values.

BUG= 672479 

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

[modify] https://crrev.com/e24cd6767ef345d4b2865d31218c1e7be14de039/components/ntp_snippets/remote/remote_suggestions_scheduler_impl.cc
[modify] https://crrev.com/e24cd6767ef345d4b2865d31218c1e7be14de039/components/ntp_snippets/remote/remote_suggestions_scheduler_impl_unittest.cc

Sign in to add a comment