Open Bug 528273 Opened 15 years ago Updated 2 years ago

Remove jitter and ringing in setTimeout/setInterval

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Windows NT
defect

Tracking

()

People

(Reporter: vlad, Unassigned)

References

Details

Attachments

(2 files)

setTimeout and setInterval exibit significant jitter, and more worryingly, some extreme ringing.  We should try to remove both of these effects.  Two benchmarks are attached, one for setTimeout and one for setInterval, both using an explicit 10ms interval.
Fundamentally, I think it's the timer thread's attempts at correction that screw us over here....
FWIW, we seem to be pretty good on the two test cases here on both linux/mac.  We only jitter by ~1ms.

On windows, though, we seem to be bimodal between 10ms (the target) and 15ms.  Its unclear to me why we vary by 5ms instead of 1ms on windows.  I assume because of some platform specific nsTimer effect or rounding through the TimeoutExecutor.
Andreas, Nathan, see comment 4.
Overholt: is this still relevant ?
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: