ImageEngine/gaffer — pull request #1089 by johnhaddon (2014-11-19 20:31:11+00:00)
Title: Viewer optimisation

This implements a significantly quicker viewer for 3d scenes, by building a custom scene graph on top of IECoreGL and performing in-place edits to keep it up to date with changes from Gaffer. The slowness of the previous viewer came largely from the fact that it had to regenerate the entire GL scene for every change.

This requires https://github.com/ImageEngine/cortex/pull/357, so the Travis build will fail until that is merged and I've got an updated set of binary dependencies uploaded to the gafferDependencies project that the Travis build uses.

This is a big change, so I'd definitely recommend some testing before general rollout. One thing to look out for in particular is that the new selective updates can expose bugs in `SceneNode::affects()` implementations which went unnoticed before - see 2a8eaed for an example. I've done some limited testing in Caribou and verified that performance is much improved, but would definitely recommend further testing on your end, particularly in relation to the new selective dirtying mechanism.

This change has been a little bit exploratory in nature, and I've been up a few blind alleys in the process of coming up with it. Although the result is a bit more special cased than I'd like, I've added some comments as to how I think it could be refactored into something a bit more widely useful in the future, with my [final commit](b71ecfb).