Re:Firefox 5 Details: Social Sharing, Extension Integration
by ootachi on Monday April 04, 2011 @01:42AM
(#2405543)
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/mozreque...
We now have to dedicate extra time to investigating and optimizing performance for FF4, which makes it scarily like IE - you get everything working in Chrome/Safari, then spend extra time getting it to work on other browsers like FF and IE.