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
MIDI: reading performance can be improved #1174
Comments
Note: with this change, |
Hi, thanks for using the package and thinking of giving back. Regarding the two proposed changes, do you have a benchmark? You mention the frozenset change saves 5%. What about the other? (The other diff is much bigger, so it would help to evaluate processing time vs. patch review time / documentation time.)
This sounds like something that might need to wait for v. 8. The frozenset change could go in now. |
They both are at aboud 5% is my measurements. I will try to come up with a benchmark set. I'll fix the pylint problems first. And thank you for the package! |
Motivation
The code that reads in MIDIs uses a lot of inefficient code, causing in rather slow reads.
Feature summary
I tried some straightforward approaches to make it more efficient. See https://github.com/kwikwag/music21/tree/feature/midi-read-performance
Proposed implementation
bytes
withmemoryview
for the reading process.frozenset()
for the_ContainsEnum
base classIntent
[x] I plan on implementing this myself.
[ ] I am willing to pay to have this feature added.
[x] I am starting a discussion with the hope that community members will volunteer their time to create this. I understand that individuals work on features of interest to them and that this feature may never be implemented.
The text was updated successfully, but these errors were encountered: