Thank everybody for the hints.
I'm surprised everybody could achieve
around 60 fps while the 3 old computers I have at home could not. You
might all be using nice machines ? Also I wonder if we are all talking
about the moment when the map is actually being moved ? Because I can
only reach 60 fps if the map is static. Maybe hardware is much more
important than I tought ? On the worst case I'm running with a Intel
Core 2 6600 @ 2.40Ghz with 2Go RAM and a GeForce 7300 Se 900Mo
=> I just find moving the map is costing me around 75-80% CPU usage on FF, 90-95% on Chrome and around 25-30% on IE. Because FF also display the graphics not as nicely as the others, I guess the trick can come from my graphic card "not getting proper drivers" and directX actually improving things for IE ?!
I
have no special plugin installed on FF (except Firebug). None in Chrome.
I activated hardware accel in Chrome wich is also not improving things.
==> As suggested I also read a bit about garbage
collection
(
http://www.scirra.com/blog/76/how-to-write-low-garbage-real-time-javascript)
and I now sadly understand that I must rewrite most of my code :(
Thank for pointing me this important topic.
I profiled the script in
Chrome and can now track the memory usage and the garbage collection of
what I'm writting.
I'll see if things get better when I'll be able to writte better code.
Thanks again for sharing.