Skip to content

clutter: Use g_signal_handler_disconnect to disconnect frequent signal

Carlos Garnacho requested to merge wip/carlosg/disconnect-from-backend into master

Clutter does the nicety of connecting just created PangoContexts to ClutterBackend signals in order to update it on resolution/font changes. However the way the signals are disconnected (with g_signal_handlers_disconnect*) may incur into performance issues with a high enough number of ClutterActors with a PangoContext (eg. ClutterText) as the lookup by func/data is linear across all signals and handlers.

Keep the handler IDs around, and disconnect them specifically on dispose so it is more O(1)-ish.

Related: #556 (closed)

Merge request reports