Hi,
The AudioProcessorGraph, when adding/removing a connection or a node, calls the internal function topologyChanged() which recreates the rendering sequence. This is great, except typically I want to make more than a single change to the graph at a time, so the topologyChanged() function gets called extraneously multiple times, which slows things down considerably.
I am wondering if there is a reason for this to be called on every single pass? Or could there be a batch add/connect function for the graph? For example, pass a flag or juce::Notification into the connect/disconnect/add/remove functions and make the topologyChanged() function public, so that a user can bypass the call until everything is set up, then manually call the function. From my tests it was taking a few seconds to make all the connections, and after making the change the time was vastly reduced.
Yeah that said – @t0m added some insane speed improvements to the graph construction in a recent update.
The other main things that can slow it down is:
Lots of bulk changes & very wide nodes with tons of input pins (mine have a lot of parameter modulation)
The quickest patches are adding a “don’t rebuild on change” mechanism and ability to manually trigger graph construction.
The other is a bit more in depth, but is improving some of the ways that source nodes & connections are traversed when doing render sequence construction. Once the graph is constructed, playback is pretty much no problem.