From 1321701189e162a72ca0f52d10ac01d1f29619c4 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 24 Apr 2016 17:35:21 +0200 Subject: [PATCH] reduce debug-build overhead. --- libs/ardour/session.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index aba1c87460..38324075c4 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2174,16 +2174,18 @@ Session::resort_routes () } #ifndef NDEBUG - boost::shared_ptr rl = routes.reader (); - for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { - DEBUG_TRACE (DEBUG::Graph, string_compose ("%1 fed by ...\n", (*i)->name())); + if (DEBUG_ENABLED(DEBUG::Graph)) { + boost::shared_ptr rl = routes.reader (); + for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { + DEBUG_TRACE (DEBUG::Graph, string_compose ("%1 fed by ...\n", (*i)->name())); - const Route::FedBy& fb ((*i)->fed_by()); + const Route::FedBy& fb ((*i)->fed_by()); - for (Route::FedBy::const_iterator f = fb.begin(); f != fb.end(); ++f) { - boost::shared_ptr sf = f->r.lock(); - if (sf) { - DEBUG_TRACE (DEBUG::Graph, string_compose ("\t%1 (sends only ? %2)\n", sf->name(), f->sends_only)); + for (Route::FedBy::const_iterator f = fb.begin(); f != fb.end(); ++f) { + boost::shared_ptr sf = f->r.lock(); + if (sf) { + DEBUG_TRACE (DEBUG::Graph, string_compose ("\t%1 (sends only ? %2)\n", sf->name(), f->sends_only)); + } } } }