Profiling and Optimization Guide

This guide describes a number of practical ways in which you can improve the performance of your Katana scenes and reduce render time. It also covers a number of systematic methods by which you can analyze your Katana scene to limit the time you need to spend optimizing your scene.

At times, some of these recommendations may appear contradictory. This is intentional: scene graphs, their Ops and inputs vary significantly between projects. What works for one scene may cause a slow down in others. Profiling and optimization should be an iterative, results driven process; with experience, you will develop an intuition as to what works well in certain situations and for certain scenes.

A general workflow pattern for optimizing Katana scene traversal is as follows:

  1. Identify an optimization target, for example, time to first pixel, memory reduction in cook() calls.
  2. Identify thread unsafe ops and refactor where possible to allow parallel evaluation.
    Measure against (1).
  3. Identify the most costly ops in the op tree.

    Analyze these ops and, where possible, optimize the code.
    Measure against (1).

    Repeat for as many ops as practicable.

  4. Analyze data dependencies in the scene graph to exploit op tree parallelism.

    Refactor node graph where appropriate.

  5. Tune cache settings.

Improving Your Node Graph

Understand the various ways of improving your node graph in Katana and learn which to use.

Ways to Improve Your Ops

There are many different ways of improving your Ops in Katana. Learn which to consider and use in a variety of circumstances.

Composing Concurrency-Friendly Scenes

Learn to identify bottlenecks, indirect use of mutexes and other synchronization primitives to understand Katana scene throughput.

Improving OpScript Performance

This guide takes you through the ways to improve OpScript performance by highlighting key areas of knowledge which are essential for scene optimization.