W3C home > Mailing lists > Public > public-web-perf@w3.org > July 2011

[Efficient Script Yielding] allow the UA to delay the event

From: Jason Weber <jweber@microsoft.com>
Date: Fri, 1 Jul 2011 22:27:28 +0000
To: Boris Zbarsky <bzbarsky@MIT.EDU>, "public-web-perf@w3.org" <public-web-perf@w3.org>
Message-ID: <8442F4DCA0FE304198740526F60E8D8B0705087B@TK5EX14MBXC243.redmond.corp.microsoft.com>
I agree we may want to throttle setImmediate in background and non-visible tabs.

Do you think we could go as far as not firing nested setImmediates in background tabs?



-----Original Message-----
From: public-web-perf-request@w3.org [mailto:public-web-perf-request@w3.org] On Behalf Of Boris Zbarsky
Sent: Thursday, June 30, 2011 12:26 AM
To: public-web-perf@w3.org
Subject: setImmediate should allow the UA to delay the event

Both setTimeout and setInterval have this step in their processing:

  * Optionally, wait a further user-agent defined length of time.

I believe it would be a good idea to have this for setImmediate as well. 
  In Gecko's implementation, we are considering introducing a delay into setImmediate invocations in background tabs, minimized windows, etc. 
Not as much of a delay as setTimeout/setInterval are getting, but some delay.

Note that as long as you only examine setImmediate this is not black-box distinguishable from throttling the entire event queue for the relevant browsing context.  You can only tell the difference by comparing order of setImmediate invocation with other events in the event queue.

-Boris
Received on Friday, 1 July 2011 22:27:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:31 UTC