LGTM3, but I agree with Rick's comments about further improvements to the rollout communication.On Thu, Nov 17, 2016 at 7:27 AM, Rick Byers <rby...@chromium.org> wrote:Thanks for the details. LGTM2A couple more minor questions inline.On Thu, Nov 17, 2016 at 5:26 AM, Philip Jägenstedt <foo...@chromium.org> wrote:If WebViewImpl::setVisibilityState is the trigger, then I think web developers can simply use document.visibilityState and the related events to know when throttling may happen. To have an API to know that it has definitely happen seems nice for predictability in principle, but if aren't any known good reasons to do a lot of work on the main thread while in the background, then I'm inclined to think we should punt on that.Rick, do you have any further concerns? LGTM1 for me.On Thu, Nov 17, 2016 at 12:26 AM 'Yuri Wiitala' via blink-dev <blin...@chromium.org> wrote:I think we're good to go here for tab capture:1. There has been recent work on detecting when there is audible sound coming from the renderer, and turning off timer throttling in that case.2. During tab capture, the captured renderer is explictly *not* told when a browser tab becomes backgrounded. Thus, a captured renderer should always behave as if it thinks it's in a foreground tab.3. Otherwise, I think the proposal here can only improve the tab capture experience. For example, if a badly behaved page's JavaScript is eating up CPU, we want the new throttling logic to engage so that we have more CPU for capture and real-time video encoding (which will improve quality).On Tue, Nov 15, 2016 at 4:31 PM, mark a. foltz <mfo...@chromium.org> wrote:+miu as an FYI. We should make sure tabs with an active content capture device are exempted as well, if they aren't already.On Mon, Nov 14, 2016 at 4:26 PM, 'Alexander Timin' via blink-dev <blin...@chromium.org> wrote:Background tabs on Android are suspended after 5 minutes in background. Minor improvements may happen, but major win is expected on desktops.Background tab is the one which is not visible to the user (WebViewImpl::setVisibilityState is the source of truth); unfocused windows are considered foreground. This mechanism is the same as currently exists for background timer alignment.So this means, for example, when we do a blog post about this we should tell users that they can always drag a tab into a new window if they don't want it to be throttled while they're working in another tab, right? I assume we don't know when a window is occluded by some other window at the OS level (or if we do, you could always have a tiny bit peaking out to keep it considered "foreground").Audio-playing sites are exempt from throttling (even after for some time after audio stopped playing).Also for your convenience I copied intervention guidelines here:Predictability: Throttling mechanism is well-defined. High-level description (only pages with significant CPU load are going to be impacted).Avoidability: Heavy computations on UI thread is not best practice, so only bad-behaved pages are going to be impacted.Transparency: Console log message is generated when tasks we throttled for non-trivial amount of time (small throttling is not reported because we already align timers in background tabs). Also developer can monitor start time of tasks and detect intervention programmatically.Great! Does / will the console warning include a URL for more details (eg. at least the chromestatus entry for now, ideally a blog post)? Can we publish a sample test page that shows this (both small throttling without a warning, and large throttling with a warning) in action to help explain what's going on?Data-driven: Main UMA metric that we are monitoring is BackgroundMainThreadLoad. It is percentage of time that renderer spends executing javascript tasks. Given that >90% of pages have low CPU usage, we are expecting changes to high percentiles (95, 99), not average (95 percentile is 10% load, 99 percentile is 90% load).Yep, that makes perfect sense. I was looking at the 99th percentile with Ojan last week - bringing that down will be huge!AlexanderOn 13 November 2016 at 00:02, Rick Byers <rby...@chromium.org> wrote:I'm excited about this, thanks for working on it!Background tabs on Android are generally 100% suspended, right? So this is primarily a desktop feature, or is there non-trivial Android impact too?Since this is an intervention, can you comment (probably best in the design doc) on the extent to which it will adhere to the intervention design guidelines? Eg. how will we measure it's positive impact, will we give advice to developers for detecting when it's active in case they need to adapt / fail? Will there be a console warning or anything to help developers understand when they're being impacted?How exactly do you define "background"? Eg. is the visible tab of an unfocused (even occluded) window "background"? I'm wondering if there's any advice we can give users who want to keep some expensive app running while they're actively using another window.I'm a little nervous about other scenarios (like background music player) that we might be breaking without realizing it. Is there any chance it would be easy / useful to use RAPPOR to get a list of top sites that would be most impacted by this in practice, just to skim for any potentially interesting use cases (eg. video editing or other computation-heavy scenarios)?Thanks!RickOn Fri, Nov 11, 2016 at 11:40 PM, Kentaro Hara <har...@chromium.org> wrote:Non-owner LGTM.keishi@ and others have also confirmed that ads on background tabs are one of the largest power consumers, so the budget-based timer throttling will help a lot to save the power consumption of Chrome.Also the budget-based timer throttling enables us to implement a background tab suspension in a better manner (i.e., we can just set the budget to a small value). The background tab suspension is a key technology of Memory Coordinator to massively drop memory from background tabs.--On Sat, Nov 12, 2016 at 4:30 AM, Alexander Timin <alt...@chromium.org> wrote:Yes, pages playing sound are exempt (that is inherited from current mechanisms to align background timers to once a second).
On 11 Nov 2016 6:09 pm, "Darin Fisher" <da...@chromium.org> wrote:This is really great, but are there any exceptions (e.g., for background pages playing sound)?-DarinOn Fri, Nov 11, 2016 at 10:06 AM, Alexander Timin <alt...@chromium.org> wrote:Contact emails
Design doc
Time-based renderer task throttling
Summary
Some badly behaved pages (e.g. javascript ads and analytics scripts) consume a lot of CPU even when the tab is in the background, impacting browser performance and battery life and ruining user experience. The idea is to place a limit on how much processing resources background pages are allowed to use.
The proposed throttling operates as follows:
Each WebView has a budget (in seconds) for running timers in background.
A timer task is only allowed to run when the budget is non-negative.
After a timer has executed, its run time is subtracted from the budget.
The budget regenerates with time (at rate of 0.01 seconds per second).
Link to “Intent to Implement” blink-dev discussion
Intent to Implement: Expensive Background Timer Throttling
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
Demo link
https://fiddle.jshell.net/vvL0e9x3/show/light
Interoperability and Compatibility Risk
Initial testing by enabling the feature locally by a small number of developers did not expose any problems. However, there exists a possibility of breakage of a major site, so we want to ship this feature via experiment-controlled rollout. This will allow us to quickly respond to issues (if any), by changing throttling aggressiveness or disabling throttling completely if necessary.
Firefox: No public signals
Edge: Positive
Safari: No public signals
OWP launch tracking bug
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/6172836527865856
Requesting approval to ship?
Yes.
Kentaro Hara, Tokyo, Japan--
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.
Alexander
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
You received this message because you are subscribed to the Google Groups "intervention-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intervention-d...@chromium.org.
To post to this group, send email to interven...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/intervention-dev/CANMdWTu_Sy_rLDi1PhMiCa%2BP01EadMMrk9s5VyyfBKcmhmiMCg%40mail.gmail.com.
Alexander
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
--
You received this message because you are subscribed to the Google Groups "intervention-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intervention-dev+unsubscribe@chromium.org.
To post to this group, send email to interven...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/intervention-dev/CANMdWTu_Sy_rLDi1PhMiCa%2BP01EadMMrk9s5VyyfBKcmhmiMCg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "intervention-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intervention-dev+unsubscribe@chromium.org.
To post to this group, send email to interven...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/intervention-dev/CAJcfO47pSSvn7oUdTUn8qKhVzF6x3-eriNsYRfd_9pKz%2BkFGtQ%40mail.gmail.com.
...
--
You received this message because you are subscribed to the Google Groups "intervention-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intervention-dev+unsubscribe@chromium.org.
To post to this group, send email to interven...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/intervention-dev/CALHg4n%3D6MAp-4%2BuyEb8ZGG5MiGsw514Hat_H37rE%3D8zU4BZHVg%40mail.gmail.com.