From 3f19db4180903425d5807a7a31262c9769683c8f Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 24 Aug 2019 17:11:10 +0200 Subject: [PATCH] Mitigate issues of expensive plugin analysis -- #7795 Plugin analysis uses a GUI thread instance of a given plugin to perform a IR analysis. Some plugins can be rather CPU expensive to analyze. e.g. a-hi/lo-filter when interpolating is recalculating biquad coefficients every 64samples during the 8k IR analysis. This can take a significant amount of time on older CPUs. Furthermore live-signal collection happens in the rt-thread, using cross-thread signals. Signal collection is periodically initiated from the same timeout signal as analysis. Analysis is was done using default thread priority, which is higher than the GUI redraw priority (PRIORITY_HIGH_IDLE). So it was possible to contiguously initiate analysis, loading the CPU and preventing redraws. --- gtk2_ardour/plugin_eq_gui.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk2_ardour/plugin_eq_gui.cc b/gtk2_ardour/plugin_eq_gui.cc index 5798dfc92e..5b9ad5c4e3 100644 --- a/gtk2_ardour/plugin_eq_gui.cc +++ b/gtk2_ardour/plugin_eq_gui.cc @@ -224,7 +224,7 @@ void PluginEqGui::start_updating () { if (!_update_connection.connected() && is_visible()) { - _update_connection = Glib::signal_timeout().connect (sigc::mem_fun (this, &PluginEqGui::timeout_callback), 250); + _update_connection = Glib::signal_timeout().connect (sigc::mem_fun (this, &PluginEqGui::timeout_callback), 250, Glib::PRIORITY_DEFAULT_IDLE); } }