[webkit-dev] Adding ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING to WebCore

Kiran Muppala cmuppala at apple.com
Mon Oct 8 13:46:55 PDT 2012


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20121008/14d7897e/attachment.html>


More information about the webkit-dev mailing list