4 ms·
About slowdowns. Which browser/OS do you use? I know I have troubles on Firefox on Windows 7. I do compensation for actual elapsed time, but unfortunately thi
by bd 16y ago
About slowdowns. Which browser/OS do you use?
I know I have troubles on Firefox on Windows 7.
I do compensation for actual elapsed time, but unfortunately this doesn't help when setInterval fires too late (in FF I can get occasional "jump" frame with 30x usual duration, I suspect due to garbage collection [1]).
Chrome and Opera are much more reliable in their JS timing.
----
[1] You can check GC + animation test here:
http://hacks.mozilla.org/2010/01/javascript-speedups-in-firefox-3-6/ http://hacks.mozilla.org/2010/01/javascript-speedups-in-fire...
FF (even version 3.6) performs pretty badly: I got 80-120 ms delay due to GC, Opera has 21ms, Chrome has 8 ms.
For my game it's even worse, normal frame can take 14 ms, garbage collected one 500 ms.