-
Notifications
You must be signed in to change notification settings - Fork 63
Fix badly architectured audio file reads #1747
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
Conversation
67dda5c
to
6ba82b5
Compare
Added the same fix for opus files too. |
Very nice! |
6ba82b5
to
b1e5c5c
Compare
I'm not sure what the hell happened with CI there, it never actually ran anything, and the only change I made was rebasing on master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This decreases the load time at start-up by easily 2x
Are you sure you're not accidentally measuring the difference between the 2 randomly selected menu soundtracks? One takes around 0.2s to load, and the other around 0.9s.
In any case, it did make a nice ~10% improvement for LoadOggCodec
in my tests.
Master, short soundtrack (heartbeat1.ogg)
SoundLoader-ext N=10 min=215355us max=261480us avg=243623us tot=2436236us
This branch, short soundtrack
SoundLoader-ext N=10 min=172695us max=232609us avg=217946us tot=2179463us
Master, long soundtrack (heartbeat.ogg)
SoundLoader-ext N=10 min=820111us max=1047663us avg=921785us tot=9217856us
This branch, long soundtrack
SoundLoader-ext N=10 min=779843us max=934458us avg=837928us tot=8379280us
b1e5c5c
to
3f3d3b4
Compare
929e1cd
to
0de548c
Compare
Removes most of the reallocations that happen because the file size is not known in advance.
0de548c
to
5ba5264
Compare
LGTM |
Removes most of the reallocations that happen because the file size is not known in advance.
This decreases the load time at start-up by easily 2x, and slightly improves load time for maps.