Runtime & Performance Version 1.1Updated 26 Sep 2026

Performance guidelines

Video effects, audio effects and generators can execute many times per second. Treat processor functions as hot paths and move expensive analysis out of the real-time render loop whenever possible.

Hot-path guidelines

  • Reuse immutable lookup tables, kernels and plans instead of rebuilding them per frame.
  • Cache expensive data by parameter signature when reuse is safe.
  • Prefer vectorized NumPy operations over Python per-pixel or per-sample loops.
  • Avoid filesystem scans, network requests and model loading inside frame/audio processors.
  • Return early for provably neutral parameter states.
  • Avoid unnecessary copies of full-resolution frames or long audio arrays.
  • Keep generator output exactly at the requested size.

Use host metadata correctly

  1. Set time_dependent accurately.
  2. Add time_dependent_when when only some parameter states are animated.
  3. Add bypass_when for states that are exactly neutral.
  4. Use a timeline processor for expensive analysis that does not belong in the real-time path.

Tip: For model-based tools, load the model once per processor run or cache it at module scope when the underlying library is safe to reuse.