GNOME Bugzilla – Bug 723183
GtkStyleContext: don't use disconnect_by_func()
Last modified: 2014-01-29 22:12:46 UTC
Fixes a frequent hang in polari (often a minute or more long) that happens when the GC kicks in.
Created attachment 267435 [details] [review] GtkStyleContext: don't use disconnect_by_func() disconnect_by_func() is slow, and this becomes particularly evident when disposing a number of widgets (and their associated style context) at once, such as when using a language binding which uses a GC.
seems like an ok workaround in the short term. proper fixes include: - add a g_signal_disconnect_first_matched - add a way to specify the signal name when disconnecting both of these should cut down on the number of signal handlers we need to look at when disconnecting
Review of attachment 267435 [details] [review]: ::: gtk/gtkstylecontext.c @@ +688,3 @@ { g_object_ref (cascade); + priv->cascade_changed_id = g_signal_connect (cascade, Looks to me like you are overwriting the id here that you want to use a few lines further down to disconnect ?
Created attachment 267576 [details] [review] GtkStyleContext: don't use disconnect_by_func() disconnect_by_func() is slow, and this becomes particularly evident when disposing a number of widgets (and their associated style context) at once, such as when using a language binding which uses a GC. ---- Right, I noticed the same problem after more testing. This one is a better patch.
Review of attachment 267576 [details] [review]: ok
Attachment 267576 [details] pushed as 8e19b76 - GtkStyleContext: don't use disconnect_by_func()