Multiple timers bug in Mozilla/Firefox
1s
This tests how accurately a browser can run multiple intervals. 100 interval timers are set to fire once every second. X offset represents the timer number. Y offset represents the offset from one second.
Ideal response is a straight horizontal line 100px long, remaining in the same place on the page (it does not matter how far down the page). It is normal to move slowly down the page (timers usually take a few ms longer than the specified time).
Because of how long it takes to start the timers, it is also normal for the line to be slightly broken. This also does not matter (as long as it is not too broken). For the best response, the amount of breakage in the line should not change. If the pieces become separated further from each other, the timers are not managing to maintain the same interval as each other.
To minimise the effects caused by other programs, the browser being tested should ideally be the only program running.
- Safari 1.2+ (1.1- fails completely) maintains a diagonal line (the timers take a long time to start) but apart from a slight jitter, the line stays perfectly still.
- Opera 7.5+ maintains a fairly consistent line, with a slow creep down the page, and a slow increase in line breakage.
- Internet Explorer 6 moves the line down the page a bit faster, and shows some odd behaviour with the timers, where they alternate between firing in the specified order, then the firing in reverse order. This pattern then breaks into smaller blocks, each behaving the same way. Some timers occasionally fail to fire.
- Firefox 1.0.4 simply goes insane. Initially, it starts out like Opera, then after a couple of firings, it suddenly starts firing far too fast, several times per second. After a few seconds, it stops firing. It pauses for as long as it should have taken to fire that many times (nearly a minute), then it repeats the same pattern, firing far too fast, then pausing again. This effect gets worse the more timers you use - with just one or two, the effect is not noticeable at all.
- iCab 3 refuses to run any more than 5 timers, and takes far longer than the others to start them. The (broken) line remains fairly steady with a lot of jitter, but each timer will occasionally jump by as much as 20% of the correct interval.
Workaround: don't use so many timers :) Use a single timer, and get it to do all the tasks that you need.
Reported; several bug reports cover this issue in Mozilla/Firefox: 234016, 240779, 250871.