diff options
author | Robin Gareus <robin@gareus.org> | 2016-12-08 10:36:12 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-12-08 10:36:12 +0100 |
commit | e1ca4b28873a195c802d7d02b5bf420d778e3f35 (patch) | |
tree | d86b5001908abf8fa5932e897bf5c654cf155376 /libs/ardour/template_utils.cc | |
parent | 9a46d593cbbc9d40c119bc0c5da40d124e476df7 (diff) |
Speed up recent session display (for many large sessions)
- don't parse XML into XMLTree
- only read the file, extract relevant elements
- don't read session-template contents, only test file
Diffstat (limited to 'libs/ardour/template_utils.cc')
-rw-r--r-- | libs/ardour/template_utils.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/ardour/template_utils.cc b/libs/ardour/template_utils.cc index 7797440f0e..b2fa703060 100644 --- a/libs/ardour/template_utils.cc +++ b/libs/ardour/template_utils.cc @@ -79,7 +79,7 @@ session_template_dir_to_file (string const & dir) void -find_session_templates (vector<TemplateInfo>& template_names) +find_session_templates (vector<TemplateInfo>& template_names, bool read_xml) { vector<string> templates; @@ -95,10 +95,11 @@ find_session_templates (vector<TemplateInfo>& template_names) for (vector<string>::iterator i = templates.begin(); i != templates.end(); ++i) { string file = session_template_dir_to_file (*i); - XMLTree tree; - - if (!tree.read (file.c_str())) { - continue; + if (read_xml) { + XMLTree tree; + if (!tree.read (file.c_str())) { + continue; + } } TemplateInfo rti; |