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:
- Identify an optimization target, for example, time to first pixel, memory reduction in cook() calls.
- Identify thread unsafe ops and refactor where possible to allow parallel evaluation.
Measure against (1). - 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.
- Analyze data dependencies in the scene graph to exploit op tree parallelism.
• Refactor node graph where appropriate.
- Tune cache settings.
Understand the various ways of improving your node graph in Katana and learn which to use.
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.