summaryrefslogtreecommitdiff
path: root/export
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2015-10-19 14:52:48 +1000
committerPaul Davis <paul@linuxaudiosystems.com>2015-10-22 11:51:03 -0400
commit689862cafb0333978268e21b08670d07255ccb99 (patch)
tree368e980e3cc1cccd360da468919ed24865e602a0 /export
parent3bd928591b62443631b373a2c8a2481aa3cff764 (diff)
Decouple Session from MidiPatchManager and reduce parsing of midnam xml files
The MidiPatchManager only requires a reference to the session to get the path to the Session midnam directory so change it so that the path is passed to MidiPatchManager::add_search_path on Session construction and removed on Session Destruction. This will also make it easier to test and reduce compile times etc. For the common case where the Session doesn't have a Session specific midnam patch files directory(for instance a new session) it won't cause a refresh and reparsing of all the midnam files. This saves about 2 seconds to load a Session on my machine(fast machine with SSD), or about half the time spent in the Session constructor for a new session. There is still going to be that initial cost of parsing the midnam files when the first session is created after starting Ardour. Options to remove that would be to parse the files asynchronously and or use a faster xml parser(eventually), neither of which seem worth doing at this stage. This change will cause a performance regression for the uncommon case where a Session with Session specific midnam files is unloaded and then another Session with Session specific midnam files is loaded as it will cause the common midnam files in midi_patch_path to be parsed twice(unload and load).
Diffstat (limited to 'export')
0 files changed, 0 insertions, 0 deletions