News for hackers. Stuff that matters.
Re:Firefox 5 Details: Social Sharing, Extension Integration by martythemaniak on Sunday April 03, 2011 @08:13PM (#2404642)
I was terribly disappointed by the performance of FF4. When releasing blockbattle.net (very JS heavy game), we knew it performed poorly in FF3.6 while flying in Chrome/Safari. We made some changes and optimizations and thought that FF4 would be at least as fast as older versions of chrome/safari but no such luck.

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.

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...