Tim Mayberry
689862cafb
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). |
||
---|---|---|
cfgtool | ||
doc | ||
export | ||
gtk2_ardour | ||
headless | ||
icons | ||
libs | ||
mcp | ||
midi_maps | ||
msvc_extra_headers | ||
MSVCardour3 | ||
MSVCMixbus3 | ||
MSVCvst_scan | ||
patches | ||
patchfiles | ||
templates | ||
tools | ||
vst | ||
.dir-locals.el | ||
.gitignore | ||
ardour-3.ttl | ||
ardour.1 | ||
ardour.1.es | ||
ardour.1.fr | ||
ardour.1.ru | ||
COPYING | ||
foo.cc | ||
instant.xml | ||
instant.xml.sae | ||
Makefile | ||
msvc32-fixup.pl | ||
PACKAGER_README | ||
README | ||
system_config | ||
testfile.flac | ||
testfile.ogg | ||
TRANSLATORS | ||
waf | ||
wscript |
Please see the Ardour web site at http://ardour.org/ for all documentation.. For information on building ardour: http://ardour.org/development.html