microsoft / ProjectAcoustics

Microsoft Project Acoustics
https://aka.ms/acoustics
Creative Commons Attribution 4.0 International
137 stars 21 forks source link

Project acoustics allocate 80 bytes when built almost 2k in editor #42

Open AndersMalmgren opened 4 years ago

AndersMalmgren commented 4 years ago

Hey guys. Our game is VR and its important it allocates zero bytes per frame. The only offender right now is project acoustics at 80 bytes per frame

image

AndersMalmgren commented 4 years ago
            if (AceFile.name != last_AceFile)
            {
                InitAcoustics();
            }

AceFile.name allocates

AndersMalmgren commented 4 years ago

Havent tested it thoroughly, but changing last_AceFile from a string to a TextAsset and compare against that instead seems to work. I tested to change file in editor and it re inited accoustics

            if (AceFile != last_AceFile)
            {
                InitAcoustics();
            }
MikeChemi commented 3 years ago

Hi @AndersMalmgren, first, thanks for the report. I just wanted to follow up. Did this change fix the allocation issue for you, or do you need further assistance from us?

AndersMalmgren commented 3 years ago

It fixes it, haven't tested enough to ensure proper execution. But it seems to hold

edit: what I meant is you need some regression testing.