I have some code where I’m moving some objects with requestAnimationFrame
. On my machine it so happens that the number of objects being moved makes the page render at 50 or so FPS with frequent temporary drops. If I add in something that intentionally wastes time, like console.error("I'm wasting time.")
, the browser’s scheduler (Chromium 35.0.1902.0 in this case) drops the animation frame frequency down to 30 FPS, which is great because the framerate drops go away and the animation is smooth.
Anyway, I’m curious whether you think:
[LIST=1]
[]I should try to optimize my code so that it always hits 60 FPS on reasonable machines.
[]I should intentionally waste time to hit 30 FPS.
[*]I should wait for browser developers to fix this undesirable behavior.
[/LIST]?
Option 2 would be a bit of a pain because I’d have to adaptively measure an amount of time to waste based on the current user’s machine’s performance budget.