- From: <bugzilla@jessica.w3.org>
- Date: Mon, 02 Jan 2012 03:44:50 +0000
- To: public-html@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15379
Summary: Hi, i was wondering why there is explicit hard limit
of how setTimeout works. In spec it says: 6.3 Timers
... "4. If the currently running task is a task that
was created by the setTimeout() method, and timeout is
less than 4, then increase timeout to 4."
Product: HTML WG
Version: unspecified
Platform: Other
URL: http://www.whatwg.org/specs/web-apps/current-work/#top
OS/Version: other
Status: NEW
Severity: normal
Priority: P3
Component: HTML5 spec (editor: Ian Hickson)
AssignedTo: ian@hixie.ch
ReportedBy: contributor@whatwg.org
QAContact: public-html-bugzilla@w3.org
CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
public-html@w3.org
Specification: http://dev.w3.org/html5/spec/Overview.html
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top
Comment:
Hi, i was wondering why there is explicit hard limit of how setTimeout works.
In spec it says:
6.3 Timers
...
"4. If the currently running task is a task that was created by the
setTimeout() method, and timeout is less than 4, then increase timeout to 4."
I think if browser implementors want, they should be allowed to allow smaller
(or even fractional) timeouts! I work on real-time JS and this is really
important to me. If anything, spec should say that timeouts less than 4 ms are
not guaranteed to happen in declared time. Spec should also say, what to do
when timeout <= 0, but should not force implementors to make their
implementations limited.
For example ua should be able to determine on its own if it will allow small
delays or not (based on system/cpu load, context switching, reflow/redisplay
frequency, how much such small delays was requested recently, is device a
battery powered, etc.).
For me it is completely artificial limitation in spec. I also find that Opera
for example allow me specific 1ms or 0.01ms timeout, and it works well
(allowing about 15000 context switches per second on my machine, instead of
just about 240 in Firefox or Chrome). It make many tasks much more responsive!
Witold Baryluk
Posted from: 91.213.255.7
User agent: Opera/9.80 (X11; Linux i686; U; pl) Presto/2.10.229 Version/11.61
--
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Monday, 2 January 2012 03:59:27 UTC