Hi! Please help me to understand this more clearly.
When a Sound instance is created and an asset ID is provided it will load that file into server and client, both right?
When a new Sound instance is created and provided with the previous loaded ID, it wont download the file again from roblox servers, its allocated in memory and will be used from there, right?
Then I made a quick test: bigFile: 150 seconds smallFile: 1.5 seconds
I placed 5000 Sound instances using the smallFile ID on an empty place. Only the first one did cause the Sound Memory go from 1mb to 2mb, (probably only kb rising, but perfomance menu doesnt show kb’s). And the other 4999 instances caused no perceptible rising on SoundMemory, it stays at 2mb.
Then I placed only 10 instances using the bigFile ID on a empty place. Same, first one made the SoundMemory go from 1mb to 2mb. But, each new instance is causing around 300kb rising on the SoundMemory, it went from 2mb to 5mb.
5000 Instances of 1.5 sec = 0mb impact on Memory 10 Instances of 150 sec = 3mb impact Memory
Why? If assets are loaded once and each new instance using the allocated asset should not increase the memory?
Does bigger assets causes the instances to have somekind of bigger metadata?
Or whats the reason why bigger assets has a greater footprint on SoundMemory than small ones? if those are are already loaded into game/client and just “cloned” from the memory to be used again?
Hi!
I’ll slice some parts of your post so here’s what i think in my own experience with Roblox. Not being a nerd .
For correcting part:
All of said above is correct: when a Sound instance with an asset ID is created, Roblox loads the sound file into both the server and client memory. If the asset is used again, it doesn’t re-download but reuses the loaded asset from cache.
About test:
Creating multiple instances (for example 5000) with the same small sound file ID shows minimal memory increase after the first instance, consistent with caching behavior. Each new instance of a larger sound file incrementally increases memory usage.
Sound files might have more complex metadata per instance which causes metadata overhead, which of course increases memory usage.
I think it’s because of resource management, buffering handling, inefficiencies in caching and metadata overhead.
Im on nerd mode dealing with this, so, your reply is helpful!
This is exactly what intrigues me, in order to decide if splitting audios will be more efficient than big audios. The context of the system is complicated to explain.
I was just wondering, if the metadata per instance for a big asset will increment this high with only a 10x difference of length. Whats the reason?
Just to give me an idea on what approach I should choose for better performance… cause Im struggling with some issues that I didn’t expect
Just looking for some opinions about this sound instance memory usage topic, theories or explanations about it
If I have a sound part (such as an entire library of sounds), and I am storing it in server storage, will it download all of the sounds and store each audio in server memory? Or will it act as a reference to Roblox’s audio database, where it will then pull and download upon playing the audio?
I am attempting to make a sound library pack for our game, that will apply across multiple places. Some sounds are commonly applied, some are unique to a certain place. But lots of tweaks and changes are constantly done, so making it into a package linked library would be best for the workflow… but just making sure we aren’t going to sacrifice server memory with unnecessary assets.