Anybody else experiencing this issue:
Create a Midi Track, load a plugin (e.g. AVL Drums) – causes xruns, sometimes up to 3, depending on the plugin. Wondering why just loading a plugin causes xruns? Jack/Pipewire Backend, Same with Alsa.
In short: Adding, removing (and re-connecting) ports is not a realtime safe operation.
If you add a synth after creating the track, the track needs audio outputs.
Ardour asks JACK/Pipewire to create those ports and while that happens no processing can happen.
Similar with other backends, new resources need to be allocated, and while there are some optimizations to swap them in safely, it still has overhead. Processing is blocked while the change is applied.