From 9fd75e33fedd99bd8e30be7ca3727c5bbdce279a Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Mon, 19 Oct 2015 08:42:28 +1000 Subject: 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 --- libs/ardour/midi_patch_manager.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'libs/ardour/midi_patch_manager.cc') 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 -- cgit v1.2.3