summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_patch_manager.cc
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2015-10-19 08:42:28 +1000
committerPaul Davis <paul@linuxaudiosystems.com>2015-10-22 11:51:02 -0400
commit9fd75e33fedd99bd8e30be7ca3727c5bbdce279a (patch)
treea9cda88c0eb32f8e9b008d819e6594aaf5207780 /libs/ardour/midi_patch_manager.cc
parent3c4f899a4faf0c45938fb17b3d74369352885e08 (diff)
Don't call MidiPatchManager::refresh when creating MidiPatchManager instance
Currently when loading a session for the first time MidiPatchManager::instance creates the MidiPatchManager singleton which calls MPM::refresh and all the midnam files are parsed etc. MPM::set_session is then immediately called and all the MPM state that has just been set when parsing all the midnam files is cleared and the parsing of all the files is performed again but this time with any session specific midnam patch files. MPM::instance and MPM::set_session consume about 55% of the time spent in the Session ctor according to kcachegrind and removing the double call to refresh brings Session construction time for a particular test session down from 7.5s to 5.5s
Diffstat (limited to 'libs/ardour/midi_patch_manager.cc')
-rw-r--r--libs/ardour/midi_patch_manager.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/libs/ardour/midi_patch_manager.cc b/libs/ardour/midi_patch_manager.cc
index 4f5cff1747..2e9b37b14a 100644
--- a/libs/ardour/midi_patch_manager.cc
+++ b/libs/ardour/midi_patch_manager.cc
@@ -43,7 +43,6 @@ MidiPatchManager* MidiPatchManager::_manager = 0;
MidiPatchManager::MidiPatchManager ()
{
- refresh ();
}
void