|
you would be better off using setTimeout() or requestAnimationFrame() so that your work loop cannot get backed up.
if something takes more than the frame display period, the next interval can get behind schedule. As these lagging executions stack up, the stack grows larger and memory consumption goes up. Some browsers throw away the backlog (chrome), while others simply grind to a halt (IE7).
in a game loop, you want to fire as often as possible, not on a pre-determined schedule: nobody will complain that your game has "too many FPS"...
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.8% IE9:11.4% IE10:6.5%
|