st: Use g_signal_handler_disconnect() to disconnect from StTheme

With a high enough amount of actors, there may be enough theme nodes and
signal connections on StTheme::custom-stylesheets-changed that
g_signal_handlers_disconnect_by*() on dispose becomes expensive, this may
become a surprisingly hot spot in StWidget::style-changed.

Keep the handler ID around and use g_signal_handler_disconnect() to avoid
linear lookups for the matching func/data.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/524
This commit is contained in:
Carlos Garnacho
2019-04-30 14:42:59 +02:00
parent d57234bec9
commit fb04dafb0b
2 changed files with 10 additions and 5 deletions

View File

@@ -107,6 +107,8 @@ struct _StThemeNode {
int box_shadow_min_width;
int box_shadow_min_height;
guint stylesheets_changed_id;
CoglPipeline *border_slices_texture;
CoglPipeline *border_slices_pipeline;
CoglPipeline *background_texture;