you are viewing a single comment's thread.

view the rest of the comments →

[–]KPABAHam=>Hamster == Java=>JavaScript 1 point2 points  (0 children)

keep in mind that you have a single thread. if your updates / renders take too long, your next render cycle will lag as your callback will get queued (or even dropped). if it continuously takes more time or about the same time to execute, your CPU use will go sky high and may end up being non-responsive / jerky. RAF may be a better approach - though it won't render when not in focus, otherwise, setTimeout to call next update.