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

Issue 745692 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Throttle requestIdleCallback to 1Hz in the background tabs.

Project Member Reported by altimin@chromium.org, Jul 18 2017

Issue description

Currently rIC fires up to 20 times a second in a background tab for 10 seconds. We should further limit this rate to 1Hz, integrate it into existing throttling mechanisms.

Probably 10 second limit should be increased to match the reduced rate. At the moment I'm thinking about 1Hz for 5 minutes (300 calls in total), which should be an adequate replacement for existing behaviour (20 calls a second for 10 seconds, 200 calls in total)
 
One issue is that V8 and Blink's GCs use the same IdleTaskRunner as rIC, and ideally we want them to be able to run quickly when the tab goes into the background to free up memory. Is it worth having an internal and external idle task runner so we can throttle one but not the other?
Re #1: I also like this idea a lot from attribution perspective — splitting GC out will help us understand real rIC performance in the world. 
Since we've now limited idle periods to cycle once every 50ms in background tabs, it feels like we probably don't need to throttle more here than that? I also feel that we shouldn't split idle work to different classes since it feels simpler if all idle work should follows the same contract.

Comment 4 by ojan@chromium.org, Jul 27 2017

It seems strange to me that rIC fires more frequently than setTimeout(0) in background tabs, but maybe it won't actually cause any real world problems?

Comment 6 by ojan@chromium.org, May 8 2018

Cc: -ojan@chromium.org
Status: Assigned (was: Available)
Labels: -Type-Bug Type-Feature

Sign in to add a comment