Caching

 
 
 

Composite can keep track of previously-computed images through an image cache, called the media cache. While building your composition, you will frequently connect new nodes to the output of existing nodes. It is beneficial for performance to avoid re-computing the image results of existing nodes, and rather read previously-computed results from a cache.

Composite supports this through its media cache, which features two caching levels: an automatically managed in-memory cache, which is limited by the size of available memory, and a disk-based cache that you can turn on per node.

Disk cached results are called intermediate results. It is counter-productive to enable intermediate results at every node in your composition: the increased disk usage in reading and writing to the disk cache will negate the gains from caching. Instead, try to identify the subgraph parts of your composition that are costly to compute and are heavily used, and cache only the outputs of those subgraphs.

For example, if you have nine subgraphs connected to nine different image sources of a single Reaction node, you can cache the outputs of those nine subgraphs. In this way, working in Reaction will only involve reading disk cached results for the nine subgraphs, rather than re-computing each one of them at potentially very high cost.

Intermediate results are the results rendered at the output of any node, other than the output nodes, in the dependency graph. When you set a node to create intermediate results, the frames displayed in the Player when you preview the results are saved to your local media cache. These frames do not need to be reprocessed as you continue adding tool nodes and viewing the results.

For example, you can add a glow tool to your composition and set it to create intermediate results. As you play the composition (or scrub through the frames), the glow is displayed as it processes. At the same time, the result is stored in your local media cache. If you add another node after the glow, Composite will not reprocess the frame.

Intermediate results are stored in the media cache as long as there is room. When the media cache is full, Composite will start discarding the images that are least recently used. You should consider this and the type of work you are doing when you turn on intermediate results for a node.

Because intermediate results are disk-based, they are available from one Composite session to the next: closing a composition (or closing Composite itself) does not clear the media cache. In contrast, memory cached results are discarded when a composition is closed (or Composite itself is closed).

Composite’s in-memory cache is read before attempting to read from the intermediate results. If a frame is generated and reused before the memory cache is exhausted, there won't be any need to visit the IRs in the media cache.

To create intermediate results on a node:

  1. Do one of the following:
    • In the Schematic, click the orange IR tab at the lower-right of a node.
    • Select a node from the dependency graph and click the IR button in the Tools Options area.

To clear the media cache of intermediate results:

  1. Open a File Browser (Ctrl + O for Windows and Linux, Cmd + O for Mac OS), right-click a composition and select Clear Cache.

    The intermediate results for all nodes of all versions of the composition are cleared.