From e35ce4c002e0dfb4db76a5108e0028719f469734 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 25 Nov 2016 10:41:23 +0100 Subject: [PATCH] Speed up AFL/PFL changes for large sessions update_latency_compensation() and resort_routes() are expensive and were called for every individual change. --- libs/ardour/session.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 0f4c5b4f73..cfb08b48ec 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -6223,11 +6223,14 @@ Session::update_route_record_state () void Session::listen_position_changed () { - boost::shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - (*i)->listen_position_changed (); + { + boost::shared_ptr r = routes.reader (); + PBD::Unwinder uw (ignore_route_processor_changes, true); + for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { + (*i)->listen_position_changed (); + } } + route_processors_changed (RouteProcessorChange ()); } void