0

I'm using createJS with HTML5 canvas to create a browser game.

Is there a big performance difference of updating the stage in the tick event

function tick() {
   stage.update();
}   

versus just calling stage.update() each time I move the shape, or add an object to the stage, etc. ?

I'm asking because it would be easier to just put stage.update in tick rather than have to remember to put stage.update() each time I make a change and want it rendered... but don't necessarily want to update the stage if I don't need to if it's going to cause a problem.

Infinite Recursion
  • 6,511
  • 28
  • 39
  • 51
user3871
  • 12,432
  • 33
  • 128
  • 268

1 Answers1

0

Absolutely, the more times you update the stage, the more CPU intensive your application will be. If you can avoid updating it, then its advisable to do it. Most applications/games can not get away with that, since something is almost always moving.

Lanny
  • 11,244
  • 1
  • 22
  • 30