play-co / timestep

GNU General Public License v3.0
16 stars 27 forks source link

Expensive Context Save/Restore and Canvas Calls #56

Closed lunarraid closed 8 years ago

lunarraid commented 9 years ago

Each render for every display object container and its children performs a context save, followed by several canvas calls for translation, rotation, etc., followed by a canvas restore. These calls are quite expensive, and this causes major performance losses in the browser canvas renderer. Investigations could be made to replace the multiple transform calls with a single setTransform call, as well as removing the overhead from the save/restore.

lunarraid commented 8 years ago

This has been implemented in https://github.com/gameclosure/timestep/pull/64.