Contact email
Design doc/Spec
Summary
Intervention: All freezable task queues in blink scheduler will be frozen (tasks on those queues will not be run) when a renderer has been in the background after grace time of 5 minutes, on Android.
We have been running a Finch experiment over last several months, and more recently on stable. This intent to ramp up and ship it.
The experiment resulted in major (40% to 72%) CPU reduction (and battery saving), and no regressions in regression-metrics.
The intervention is Android only, and inline with expectations on mobile, as mobile platforms already do CPU suspension and throttling in background.
Motivation
Many sites continue activity, even after their app has been in background for over 5 minutes. This consumes non-trivial amount of CPU, battery and network bandwidth, and hurts the responsiveness of the foreground app, especially on mobile. Our UMA data showed non-trivial CPU work being done in background - even after 5 minutes.
Earlier this year we shipped the intervention to freeze loading in background (resulting in significant data saving and some CPU reduction).
This intervention yielded even more significant (~72% in M69) CPU reduction (and battery savings) and shipping it concludes freezing background work on mobile.
(Similar experiments are running on desktop)
Risks
Compatibility & Interoperability
Compat risk: low
Interop risk: low
There are no outstanding issues in the Finch experiment.
Freezing has been made a part of the web platform via Page Lifecycle API, onfreeze and onresume callbacks will notify apps when the “freezing after 5mins” intervention triggers.
(Note that some browsers already do CPU suspension and aggressive throttling in some cases, without firing any callbacks.)
Intervention Guidelines
Predictability
The mechanism is well defined and predictable, same as stopping timers and loading in background. onfreeze / onresume Page Lifecycle callbacks will fire to notify apps. Freezing all freezable task queues improves predictability over freezing only timers & loading.
Avoidability
Continuing to do work in background after 5 minutes is not a good practice, especially on mobile (for data and battery).
Transparency
onfreeze / onresume Page Lifecycle callbacks will fire to notify apps.
Data-driven
See success and regression metrics here.
Debuggability
Freezing can be manually triggered and tested via chrome://discards.
A JS callback is emitted when the intervention is triggered.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
This intervention will be implemented on Android only.
Experiments are ongoing for freezing (and discarding) in background on desktop.
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/4639097628917760
Requesting approval to ship?
Yes.
Contact email
Design doc/Spec
Summary
Intervention: All freezable task queues in blink scheduler will be frozen (tasks on those queues will not be run) when a renderer has been in the background after grace time of 5 minutes, on Android.
We have been running a Finch experiment over last several months, and more recently on stable. This intent to ramp up and ship it.
The experiment resulted in major (40% to 72%) CPU reduction (and battery saving), and no regressions in regression-metrics.
The intervention is Android only, and inline with expectations on mobile, as mobile platforms already do CPU suspension and throttling in background.
Motivation
Many sites continue activity, even after their app has been in background for over 5 minutes. This consumes non-trivial amount of CPU, battery and network bandwidth, and hurts the responsiveness of the foreground app, especially on mobile. Our UMA data showed non-trivial CPU work being done in background - even after 5 minutes.
Earlier this year we shipped the intervention to freeze loading in background (resulting in significant data saving and some CPU reduction).
This intervention yielded even more significant (~72% in M69) CPU reduction (and battery savings) and shipping it concludes freezing background work on mobile.
(Similar experiments are running on desktop)
Risks
Compatibility & Interoperability
Compat risk: low
Interop risk: low
There are no outstanding issues in the Finch experiment.
Freezing has been made a part of the web platform via Page Lifecycle API, onfreeze and onresume callbacks will notify apps when the “freezing after 5mins” intervention triggers.
(Note that some browsers already do CPU suspension and aggressive throttling in some cases, without firing any callbacks.)
Intervention Guidelines
Predictability
The mechanism is well defined and predictable, same as stopping timers and loading in background. onfreeze / onresume Page Lifecycle callbacks will fire to notify apps. Freezing all freezable task queues improves predictability over freezing only timers & loading.
Avoidability
Continuing to do work in background after 5 minutes is not a good practice, especially on mobile (for data and battery).
Transparency
onfreeze / onresume Page Lifecycle callbacks will fire to notify apps.
Data-driven
See success and regression metrics here.
Debuggability
Freezing can be manually triggered and tested via chrome://discards.
A JS callback is emitted when the intervention is triggered.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
This intervention will be implemented on Android only.
Experiments are ongoing for freezing (and discarding) in background on desktop.
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/4639097628917760
Requesting approval to ship?
Yes.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAK7ODi-StMnBPH%3DKJFUtHTVVxe%2BjeJ%3DWp_VZqux4D3v6VrNR9g%40mail.gmail.com.
Debuggability
Freezing can be manually triggered and tested via chrome://discards.
A JS callback is emitted when the intervention is triggered.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
This intervention will be implemented on Android only.
Experiments are ongoing for freezing (and discarding) in background on desktop.
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/4639097628917760
Requesting approval to ship?
Yes.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
On Wed, Aug 22, 2018 at 7:26 PM Shubhie Panicker <pani...@chromium.org> wrote:Contact email
Design doc/Spec
Summary
Intervention: All freezable task queues in blink scheduler will be frozen (tasks on those queues will not be run) when a renderer has been in the background after grace time of 5 minutes, on Android.
We have been running a Finch experiment over last several months, and more recently on stable. This intent to ramp up and ship it.
The experiment resulted in major (40% to 72%) CPU reduction (and battery saving), and no regressions in regression-metrics.
Impressive numbers! :)
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
Debuggability
Freezing can be manually triggered and tested via chrome://discards.
A JS callback is emitted when the intervention is triggered.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
This intervention will be implemented on Android only.
Experiments are ongoing for freezing (and discarding) in background on desktop.
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/4639097628917760
Requesting approval to ship?
Yes.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEimGk%3DU9ekuSpJcWV8rJYD9Eq%3DYJJ3bkeRvs8cPgpTdLA%40mail.gmail.com.
Debuggability
Freezing can be manually triggered and tested via chrome://discards.
A JS callback is emitted when the intervention is triggered.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
This intervention will be implemented on Android only.
Experiments are ongoing for freezing (and discarding) in background on desktop.
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/4639097628917760
Requesting approval to ship?
Yes.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAK7ODi-StMnBPH%3DKJFUtHTVVxe%2BjeJ%3DWp_VZqux4D3v6VrNR9g%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEimGk%3DU9ekuSpJcWV8rJYD9Eq%3DYJJ3bkeRvs8cPgpTdLA%40mail.gmail.com.
Debuggability
Freezing can be manually triggered and tested via chrome://discards.
A JS callback is emitted when the intervention is triggered.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
This intervention will be implemented on Android only.
Experiments are ongoing for freezing (and discarding) in background on desktop.
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/4639097628917760
Requesting approval to ship?
Yes.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAK7ODi-StMnBPH%3DKJFUtHTVVxe%2BjeJ%3DWp_VZqux4D3v6VrNR9g%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Debuggability
Freezing can be manually triggered and tested via chrome://discards.
A JS callback is emitted when the intervention is triggered.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
This intervention will be implemented on Android only.
Experiments are ongoing for freezing (and discarding) in background on desktop.
I'm missing the "Is this feature fully tested by web-platform-tests?" section.What's the testing story here?
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/4639097628917760
Requesting approval to ship?
Yes.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAK7ODi-StMnBPH%3DKJFUtHTVVxe%2BjeJ%3DWp_VZqux4D3v6VrNR9g%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
Debuggability
Freezing can be manually triggered and tested via chrome://discards.
A JS callback is emitted when the intervention is triggered.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
This intervention will be implemented on Android only.
Experiments are ongoing for freezing (and discarding) in background on desktop.
I'm missing the "Is this feature fully tested by web-platform-tests?" section.What's the testing story here?Re: wpt tests, I wasn't sure if that was generally needed for shipping interventions.In terms of wpt tests for the Page Lifecycle API (separate from this Intent) - we still havehttps://github.com/WICG/page-lifecycle/issues/19 which is blocked on infra changes, specifically this one:foolip@ indicated that the blocker is being prioritized by their team, so we should be able to land once it's done.
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/4639097628917760
Requesting approval to ship?
Yes.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAK7ODi-StMnBPH%3DKJFUtHTVVxe%2BjeJ%3DWp_VZqux4D3v6VrNR9g%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/4639097628917760
Requesting approval to ship?
Yes.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAK7ODi-StMnBPH%3DKJFUtHTVVxe%2BjeJ%3DWp_VZqux4D3v6VrNR9g%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAK7ODi-StMnBPH%3DKJFUtHTVVxe%2BjeJ%3DWp_VZqux4D3v6VrNR9g%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEimGk%3DU9ekuSpJcWV8rJYD9Eq%3DYJJ3bkeRvs8cPgpTdLA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/91da0334-7781-4331-abb0-31696c489231%40chromium.org.
Hi Shubhie,You say "all freezable task queues". Are there any task queues that are not freezable? Is this concept in a spec somewhere if there are differences?
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAK7ODi-StMnBPH%3DKJFUtHTVVxe%2BjeJ%3DWp_VZqux4D3v6VrNR9g%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEimGk%3DU9ekuSpJcWV8rJYD9Eq%3DYJJ3bkeRvs8cPgpTdLA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/91da0334-7781-4331-abb0-31696c489231%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw90OpRbvcsWs695aNB7QJHzanF%3D-BedVxgOzkw6zrmMGA%40mail.gmail.com.To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAK7ODi-StMnBPH%3DKJFUtHTVVxe%2BjeJ%3DWp_VZqux4D3v6VrNR9g%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEimGk%3DU9ekuSpJcWV8rJYD9Eq%3DYJJ3bkeRvs8cPgpTdLA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/91da0334-7781-4331-abb0-31696c489231%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw90OpRbvcsWs695aNB7QJHzanF%3D-BedVxgOzkw6zrmMGA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAK7ODi8sNGy2v-SciNGXYSwCcqXzicpdztynKmvMCMy4qucz%2BA%40mail.gmail.com.
I think most of your concerns are shared with the people working on this, but they balance it with other concerns as well. If a mobile browser lets too many background tabs run along, they actually end up crashing or getting killed so the current situation is already bad. This is an attempt at making the behaviour well defined and documented.
Maybe the alternative solutions you mention should have come before the intervention but I have confidence that there will at least be something. Because as you say, some sites, acting more as services, do need to be able to work also when they are in the background.Finally, I expect everyone involved to be responsive to bugs and
compatibility problems and either delay or adjust as needed.
Nobody wants to break anything useful.
/Daniel
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/21e6b190-2339-49a3-a1a2-13a7e625f207%40chromium.org.