Allow Prerendering for ORIGIN_OFFLINE request on low end devices |
|||||
Issue descriptionWe want to be able to develop and evaluate background offlining support on low end (svelte) devices since they are common in the EM countries. Currently, PrerenderManagerFactory::BuildServiceInstanceFor(...) returns null if base::SysInfo::IsLowEndDevice() so it is not possible to try prerendering. Possibly this condition might be modified with a developer flag for now to go ahead and create the PrerenderManager instance if it is set (to avoid this instance creation for production clients) or perhaps some other way to trigger instance creation when the Offline feature gets used. I don't know if there are other places in the prerender stack that need modification (certainly could be some other policy considerations) but I was able to successfully offline a page on a svelte device in a dev build in which I disable the IsLowEndDevice check in the factory.
,
Jun 27 2016
One question: what is the bigger story? Can we rely on upper layers to behave "properly", like always killing prerender when we go to foreground or off the battery? What is our definition of proper behavior?
,
Jun 27 2016
Yes, we do want the upper layer to be responsible for foreground detection, battery level, and some other feature policy concerns too (user-requested, network type allowed). Probably makes sense for me to write a 1-2 pager on this. We might want to constrain the scope of this Issue to be developer flag support and then later enable broadly via different Issue once we have landed and evaluated the upper level policy support. I'm appending to this Issue's Summary.
,
Jun 27 2016
> Probably makes sense for me to write a 1-2 pager on this. This would certainly help. Perhaps we can also figure out upfront how we are going to test it. This would make it easier to agree on review with mmenke@, I think. If you start a paragraph about testing with a braindump of what you know, I can add my braindump for the Android land (even though I am not a huge expert on android-side testing). > We might want to constrain the scope of this Issue to be developer flag Do you mean a commandline flag? I think it only can be worth extra complexity if you want to launch the non-svelte version first, which I thought is not what you want? ..
,
Jun 27 2016
True - makes sense to focus on svelte use case first and extra flag not necessary.
,
Jul 20 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/93ec7def5cee33305155e15131c439d23ddceb0d commit 93ec7def5cee33305155e15131c439d23ddceb0d Author: dougarnett <dougarnett@chromium.org> Date: Wed Jul 20 15:51:25 2016 PrerenderingOffliner will abort background load if it sees chrome transitioning to foreground on low-end devices. Also adds new FOREGROUND_CANCELED request status (and histogram enum value). BUG= 627884 , 622508 Review-Url: https://codereview.chromium.org/2149773002 Cr-Commit-Position: refs/heads/master@{#406565} [modify] https://crrev.com/93ec7def5cee33305155e15131c439d23ddceb0d/chrome/browser/android/offline_pages/prerendering_offliner.cc [modify] https://crrev.com/93ec7def5cee33305155e15131c439d23ddceb0d/chrome/browser/android/offline_pages/prerendering_offliner.h [modify] https://crrev.com/93ec7def5cee33305155e15131c439d23ddceb0d/chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc [modify] https://crrev.com/93ec7def5cee33305155e15131c439d23ddceb0d/components/offline_pages/background/offliner.h [modify] https://crrev.com/93ec7def5cee33305155e15131c439d23ddceb0d/tools/metrics/histograms/histograms.xml
,
Jul 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6dd8c1ec9f9c9339676e83374eb78c627fc4aa1e commit 6dd8c1ec9f9c9339676e83374eb78c627fc4aa1e Author: dougarnett <dougarnett@chromium.org> Date: Thu Jul 21 15:54:19 2016 [OfflinePages] Do not start background loading on low-end devices if app has any visible Activities. BUG= 627884 , 622508 Review-Url: https://codereview.chromium.org/2164503003 Cr-Commit-Position: refs/heads/master@{#406864} [modify] https://crrev.com/6dd8c1ec9f9c9339676e83374eb78c627fc4aa1e/base/android/java/src/org/chromium/base/SysUtils.java [modify] https://crrev.com/6dd8c1ec9f9c9339676e83374eb78c627fc4aa1e/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundOfflinerTask.java [modify] https://crrev.com/6dd8c1ec9f9c9339676e83374eb78c627fc4aa1e/chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/BackgroundOfflinerTaskTest.java
,
Jul 29 2016
,
Aug 1 2016
,
Aug 3 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/63b429af6ac2e1a0835e30ddd962fc4ebad2cd1b commit 63b429af6ac2e1a0835e30ddd962fc4ebad2cd1b Author: pasko <pasko@chromium.org> Date: Wed Aug 03 16:27:27 2016 Prerender: Allow on low end devices for ORIGIN_OFFLINE TL;DR: Prerendering cannot keep track of all child processes, and only allows prerendering when asked by the offliner. Low end devices require (best effort at) keeping no more than one renderer process at any time. Prerendering has been disabled on low end devices because of this. Offliner should be able to create prerenders, and it needs to ensure that these prerenders are: * not created when another renderer is alive * killed when Chrome another renderer is created We identified additional cases when to prevent offlining, among which: * Chrome is in foreground (even though may not have a renderer) * Battery level is low Since the foreground checks should be in place anyway, we decided that while Chrome is in background having two background renderers is OK, and we can rely on one (or both) of them being killed by the system. For simplicity the offliner does not actually watch for renderers specifically, only: * Prevents offlining when any Chrome activity is visible * Kills its prerenders when a transition to foreground happens BUG= 622508 Review-Url: https://codereview.chromium.org/2197663002 Cr-Commit-Position: refs/heads/master@{#409528} [modify] https://crrev.com/63b429af6ac2e1a0835e30ddd962fc4ebad2cd1b/chrome/browser/prerender/prerender_manager.cc [modify] https://crrev.com/63b429af6ac2e1a0835e30ddd962fc4ebad2cd1b/chrome/browser/prerender/prerender_manager.h [modify] https://crrev.com/63b429af6ac2e1a0835e30ddd962fc4ebad2cd1b/chrome/browser/prerender/prerender_manager_factory.cc [modify] https://crrev.com/63b429af6ac2e1a0835e30ddd962fc4ebad2cd1b/chrome/browser/prerender/prerender_unittest.cc
,
Aug 3 2016
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by pasko@chromium.org
, Jun 23 2016