koggdal/ocanvas — pull request #93 by joelpurra (2014-02-22 14:45:36+00:00)
Title: When un/loading a scene, redraw canvas only once, instead of per object

When working with scenes with a lot of objects, redrawing the canvas when un/loading takes a lot of time. Instead of doing a per-object redraw, redraw only once per scene un/load.

In my test project, I've got a scene with a few hundred objects; this patch reduced time spent in `canvas.scenes.load("my-scene");` from 828 milliseconds to 33 milliseconds (96% time saved). Your mileage may vary with the number of objects.

- No change in API.
- Adding or removing objects to already loaded scenes is unaffected.

While it looks like v3.0.0 in the pipeline, this would help v2.5.1 users.