Introduce g_object_notify_by_pspec()

g_object_notify_by_pspec() will emit the "notify" signal on the given
pspec, short-circuiting the hash table lookup needed by
g_object_notify(). The suggested and documented way of using
g_object_notify_by_pspec() is similar to the way of emitting signals
with their ID.

Emission tests (with no handler attached to the notify signal) show a
10-15% speedup over using g_object_notify().

https://bugzilla.gnome.org/show_bug.cgi?id=615425
This commit is contained in:
Damien Lespiau
2010-04-10 15:50:40 +01:00
committed by Emmanuele Bassi
parent 08f473ffef
commit f3879a4bdc
4 changed files with 79 additions and 7 deletions

View File

@@ -269,6 +269,7 @@ g_object_disconnect
g_object_set
g_object_get
g_object_notify
g_object_notify_by_pspec
g_object_freeze_notify
g_object_thaw_notify
g_object_get_data