-
Notifications
You must be signed in to change notification settings - Fork 39
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
Speedup sofa #45
Speedup sofa #45
Conversation
This function minimizes calling time expensive function, like sofa_get_header()
I'm still not sure if the changes in the code are worth for integration. The speedup comes to play only for very huge numbers of loudspeakers (>10000) or if you use the |
As far as I understood the current implementation, the SOFA file is accessed for each head orientation and for each loudspeaker position separately. This means, that an impulse response (having e.g. the index "42" ) is loaded from the hard disk drive into the RAM several times. If we really want to speed up things, then this architecture has to be reassessed. An alternative workflow could be:
The major drawback of this approach is, that there might be a huge number of impulse responses which are loaded into the RAM at once. One could define a maximum number of irs loaded in one step and then iterate as long as there are impulse responses left to be processed. However, one would have ensure, that there is always at least one head-orientations-ssd-position pair which can be processed with the current impulse responses in the RAM. |
I agree, there is more we could do and your points sound meaningful, but also not too easy to implement. I would propose that we leave the current (as it is in master) SOFA implementation for the next Toolbox release. |
This version includes some time optimizations for using SOFA together with
ir_generic()
.It needs some more testing to see, if all the SOFA stuff is ready now.