Hi webkit-dev,

I wanted to let you know that I plan to add a feature to support throttling of 
DOM timers on hidden pages to WebKit.  This support will be hidden behind the 
ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING feature define.  See: 
https://bugs.webkit.org/show_bug.cgi?id=98474

The way it works is to make DOM timers on pages whose visibility is set to 
"hidden", fire only at times that are even multiples of a specified alignment 
interval, currently set to 1 second.  This aligning of timers differentiates it 
from the existing mechanism for throttling, namely increasing the minimum timer 
interval.  Further, alignment is not subject to the ramp-up behavior of minimum 
timer interval, where the first five times of a repeating timer or a chained 
series of one-shot timers get no clamping.

This feature is not yet fully backed and it has a risk of compatibility issues. 
 A known issue at this time is that pages that use timers to schedule WebAudio 
playback instead of events will have breaks in audio output.  For instance 
http://chromium.googlecode.com/svn/trunk/samples/audio/shiny-drum-machine.html. 
 Putting this behind a feature define will allow each port to decide if they 
are interested and enable it individually.  Enabling it on more ports would 
help us better test this feature and we appreciate any help we can get.

We will be enabling this feature on Mac and hence it will be tested by the 
existing Mac buildbots.  Looking forward to your feedback.

- Kiran

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to