Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Performance: Slow MIDI import due to message being shown repeatedly #2028
The MIDI import is quite slow due to
An example MIDI that can be used to reproduce the issue can be found at http://www.vgmusic.com/music/console/nintendo/wii/mkwii-koopacape.mid (please also refer to #1971 for further sources). If you comment out the call to
I assume that the current implementation of
The simplest solution might be to remove the message altogether. In my opinion even in an interactive case the information provided by the displayed message is not really useful to the user. If the user connects something that's already connected the system should simply do nothing because in the end it would still have the same effect that the user intended.
If the message should be kept for interactive cases there are two ways I can think of to improve the performance for the MIDI import case:
I would prefer the first solution because it keeps the usage of
I don't deal with midi files enough to know if it's worth leaving the message in under interactive mode or not, but if you do leave the message in interactive modes, I agree with your decision to use option 1 over option 2.
Especially seeing as how AutomationPattern is in the core and not the gui, AutomationPattern should really be totally unaware of the existence of the gui's
AutomationPattern::addObject now returns a boolean which indicates whether the object was added or not. This change enables the removal of the error message that is shown in the case that a model is already connected from AutomationPattern::addObject. Instead all interactive callers now check for the return value and show the message in case it is needed. This change set improves the import of MIDI files significantly. These have been slowed down quite a lot due to the message being shown repeatedly during the MIDI import.