mutagen
mutagen copied to clipboard
Slow reading large SMF files
I accidentally left MIDI recorder running and it created a large file (1200 minutes). The application hosting this (Zynthian) hands for several seconds whilst it parses the file (for its duration).
Is there any optimisation that could avoid excessively long parsing times?
It's slow because it has to parse each note for each track to sum up the running time: https://github.com/quodlibet/mutagen/blob/master/mutagen/smf.py
It's slow, but I considered it OK at that time as it scales with the file size.
Feel free to improve it.