Efficiency of Event vs Command Instruments

Is there a computational difference between FMOD’s event vs command instruments?

Use example: I’d like to trigger the tail to a player weapon in a separate event but, since it can be spammed, I’m curious to know if an event instrument is less demanding than triggering the event start via a command instrument

I would expect there to be some negligible constant-time overhead to command instruments in that to play a sound with a command instrument results in 2 API calls- one to issue the command, and another to play the event. As the event count increases however there is the possibility of commands getting dropped due to command buffer overflow- which would make it more performant, but only because some commands aren’t being executed.
For comparison, here is 100 events vs 100 commands:


You can see they have approximately the same cpu overhead- the update thread looks a little more stressed when playing 100 events.
Here is 512 events vs 512 commands:

You can see a significant reduction of about 50% in cpu when calling 512 commands, but there are warnings about the command buffer being resized, showing that the cpu reduction is actually a side effect of commands being dropped and events never being played.
In any case, I would recommend trying each alternative, profiling both options, and basing your decision off of data collected for your specific use case.

1 Like