speed up session load (display updates)
authorRobin Gareus <robin@gareus.org>
Sat, 6 Sep 2014 10:52:29 +0000 (12:52 +0200)
committerRobin Gareus <robin@gareus.org>
Sat, 6 Sep 2014 10:52:29 +0000 (12:52 +0200)
gtk2_ardour/ardour_ui.cc
gtk2_ardour/ardour_ui_dependents.cc
gtk2_ardour/editor.cc
gtk2_ardour/editor_routes.cc
gtk2_ardour/editor_routes.h

index 8bb27b7f1433cb55b98f2a4f6905b15cb5473d63..916907a0465456f1de80140d788ede67279437c2 100644 (file)
@@ -553,9 +553,12 @@ ARDOUR_UI::post_engine ()
        Glib::signal_timeout().connect_seconds (sigc::mem_fun(*this, &ARDOUR_UI::update_wall_clock), 1);
 #endif
 
-       Config->ParameterChanged.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::parameter_changed, this, _1), gui_context());
-       boost::function<void (string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1));
-       Config->map_parameters (pc);
+       {
+               DisplaySuspender ds;
+               Config->ParameterChanged.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::parameter_changed, this, _1), gui_context());
+               boost::function<void (string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1));
+               Config->map_parameters (pc);
+       }
 }
 
 ARDOUR_UI::~ARDOUR_UI ()
index bb0f375942348a2c9ca9f172ddfe52d073cba157..c27ade9fedfd4bd9d3ac6cc537c20cd9946a8c55 100644 (file)
@@ -72,6 +72,7 @@ ARDOUR_UI::we_have_dependents ()
 void
 ARDOUR_UI::connect_dependents_to_session (ARDOUR::Session *s)
 {
+       DisplaySuspender ds;
        BootMessage (_("Setup Editor"));
        editor->set_session (s);
        BootMessage (_("Setup Mixer"));
index 4227a6e03ccfcf3c85087ead1e090cbbd956c470..87ee9085d5cfca15534df3a4a96aeae4d3eed5d2 100644 (file)
@@ -893,6 +893,7 @@ void
 Editor::show_window ()
 {
        if (!is_visible ()) {
+               DisplaySuspender ds;
                show_all ();
 
                /* XXX: this is a bit unfortunate; it would probably
index 1ca8cf2a653501d2b170ddb06dc107ca17427447..e00748c2fb90183131b4de879d5f63043b24bacb 100644 (file)
@@ -494,9 +494,10 @@ EditorRoutes::show_menu ()
 void
 EditorRoutes::redisplay ()
 {
-       if (_no_redisplay || !_session || _session->deletion_in_progress()) {
+       if (_no_redisplay || !_session || _session->deletion_in_progress() || _redisplaying) {
                return;
        }
+       _redisplaying = true; // tv->show_at() below causes recursive redisplay via handle_gui_changes()
 
        TreeModel::Children rows = _model->children();
        TreeModel::Children::iterator i;
@@ -545,6 +546,7 @@ EditorRoutes::redisplay ()
                */
                _editor->vertical_adjustment.set_value (_editor->_full_canvas_height - _editor->_visible_canvas_height);
        }
+       _redisplaying = false;
 }
 
 void
index 21a92fc423746252be3d1cf9423ec8f513e3d0f0..704a31a1b6a58133fd0b84ec41e3d34d66f75201 100644 (file)
@@ -151,6 +151,7 @@ private:
 
        bool _ignore_reorder;
        bool _no_redisplay;
+       bool _redisplaying;
         bool _adding_routes;
         bool _route_deletion_in_progress;