Skip to content

Start using g_object_notify_by_pspec()

Niels De Graef requested to merge wip/nielsdg/g-object-notify into master

From the last commit message:

`g_object_notify()` actually takes a global lock to look up the property
by its name, which means there is a performance hit (albeit tiny) every
time this function is called. For this reason, always try to use
`g_object_notify_by_pspec()` instead.

Using g_object_install_properties() is actually a best-practice imho.

I did a small check and added a log after every call to g_object_notify() in gimpobject.c, and in the loading screen only, it is already called a whopping 6185 times. So that's 6185 times we're uselessly locking/unlocking to look up the property name :-)

Merge request reports