Godot Version
Godot 4.5.1
Question
Hi there!
I’ve recently been optimizing the project I am working on and ran into a very strange issue: Playing sound effects using the Audio system I’m using causes a rather large Processing time spike, marked via. the red box in this image:
I am using an Audio System that was suggested in this video by Aarimous.
The code can be accessed via. this GitHub repository.
The important bit is that the AudioManager suggested in this video is a Global. All sounds I am playing are standard fare Wave files.
After a ton of detective work desperately trying to figure out why in the world this is happening, I’ve noticed that a local AudioStreamPlayer doesnt cause this issue.
On a whim, I decided to do the following:
- Remove the AudioManager from the Globals list
- Load it up on game start from my “main” Node
- Save a reference to it in a Global that just exists as a quick and dirty way to get references to certain Nodes
- Use the exact same functions and code, but this time invoking it via “Globals.AudioManager” instead of “AudioManager” when it was Global.
Lo and behold, somehow the performance difference is massive:
This seems more appropriate for playing a wave file.
However, this entire ordeal has left me frustratingly confused: What in the world is going on? The exact same code is being executed here.
Why is the AudioManager system registered as a Global so much less performant? What underlying mechanics have changed?
Thanks.

