-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix a lag spike in the audio bus editor #81611
Conversation
For renaming audio buses, I wish for a new signal: For now, we could add My reasoning is: When I developed an audio manager plugin, any bus renamings in the editor ended up with me having to cache all bus names and then on each |
Hmm okay. I don't know enough about audio to judge if this is a reasonable compat-break? |
Once And if any project relies on the Hm… I guess I can open an issue+PR and then see what the feedback is |
Yes, please open a proposal! Would be good to bring it up with audio contribs. These systems were implemented by reduz like 7 years ago and I think I can easily implement this change if we agree on it. (actually I'm going to make an alternative PR in a bit) |
Superseded by #81641. |
I disconnected
bus_layout_changed
from the function that rebuilds audio buses, as renaming audio buses causes the whole audio bus editor to rebuild which is undesired. This required a hefty workaround to avoid a lag spike when renaming, and it also caused duplicating to rebuild the audio bus editor twice just to add a new bus, and to then rename it. Now I removed the hefty workaround.On top of unnecessary rebuilds from renaming, UndoRedo often asked for YET another rebuild. Rebuilding is an expensive operation that can cause a visible lag spike, especially if you have a lot of audio buses, which made this blunder quite noticeable. The rebuilds UndoRedo asks for are now the only ones I've kept (actually I removed one when resetting a bus volume, as you can ask for a single bus to be updated there)
Regarding the comment I wiped - I'm positive that renaming audio buses should emit
bus_layout_changed
- as it changes how you interact with the audio bus system, not just how it affects audio. For example, AudioStreamPlayer relies on this signal to have an up-to-date list of buses you can pick in the inspector.