3 ms·
Usually comments like yours are the result of relying on precise setTimeout()/setInterval(). Firefox has a very coarse-grained setTimeout/setInterval (it's capp
by ootachi 16y ago
Usually comments like yours are the result of relying on precise setTimeout()/setInterval(). Firefox has a very coarse-grained setTimeout/setInterval (it's capped at 10ms) compared to WebKit. Mozilla can't change this easily as it breaks the web and hurts power management.
I just took a cursory glance at blockbattle.net's source and it may well be the problem. Thankfully, FF4 has a solution: mozRequestAnimationFrame(). This explanation [1] should be required reading for everyone doing games and animations in JS.
[1]: http://weblogs.mozillazine.org/roc/archives/2010/08/mozrequestanima.html http://weblogs.mozillazine.org/roc/archives/2010/08/mozreque...