Documentation

Learn how to use FlowCanvas

Download PDF Version

Performance Considerations

A lot of work has been put into performance optimizations, however since FlowCanvas does not generate actual c# code, it naturally also is slower that actual code, but not by that much. However the fact that no c# code is generated also allows for a friendlier workflow of approaching visual scripting which would otherwise not be possible. Following is a comparison test between c# code and a graph doing the exact same thing on 500 gameobjects. This test has been done on a JIT compiler platform (desktop).  In AOT platforms performance will be slower since IL.Emit is not supported in AOT. It is also worth noting that in actual build, performance will be better since some code that exists to support the editor is stripped in build.

While working in FlowCanvas you should also be aware of the following things which can be performance costly especially when they run frequently (like within an Update loop):

  • AutoConversion (connections) specifically between Value Types (eg int to float), creates garbage allocations due to unavoidable value boxing.
  • Macro Inputs and Macro Outputs specifically of Value Type ports, also creates garbage due to value boxing.
  • Data Bound Fields are slower than Data Bound Properties.
Yes No Suggest edit
1 of 1 users found this section helpful
Suggest Edit