ImageEngine/cortex — pull request #47 by ldmoser (2013-07-27 00:04:20+00:00)
Title: ObjectPool and ComputationCache for SceneCache and others

The motivation for this pull request was to optimize loading SceneCaches in applications. There's a considerable overhead on loading the same data from the file and that happens on two situations: either it's a repetitive environment (using LinkedScene), and/or it's an animated hierarchy and users go back and forth on the timeline.

It looks like we need two levels of caching:
a) The low level, we simply cache Objects by their hashes, guaranteeing data deduplication in memory.
b) The second level, is about mapping a computation process to the result of the computation, using hashes on both ends.

The low level (a) is already committed in this pull request as the class ObjectPool. Which can be used on the entire application to manage all the cortex objects cached in memory.

When the second level (b) is ready, it could be used in the SceneCache, CachedReader and potentially in Gaffer. In SceneCache, we need to cache attributes, transforms and objects for improved playback and load times.