Optimize connection of Python-implemented signals
Optimize connection of Python-implemented signals

Like properties, when working with signals we must detect if the
signal is implemented in a Python class or if it originates from the
gi repository, and act accordingly.

Asking the gi repository if it can find a signal that is implemented
in a Python class (it can't) takes a considerable amount of CPU time.

Use g_signal_query() to find out which GType implements the signal.
Then perform a simple test to see if this type is implemented at the
Python level, allowing us to to skip the GI querying in this case.

https://bugzilla.gnome.org/show_bug.cgi?id=696143

pexip/pygobject,davibe/pygobject,GNOME/pygobject,pexip/pygobject,GNOME/pygobject,sfeltman/pygobject,GNOME/pygobject,davibe/pygobject,sfeltman/pygobject,sfeltman/pygobject,davibe/pygobject,pexip/pygobject,davibe/pygobject