mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 14:42:10 +01:00
fastpath: Do allow NO_RECURSE fastpath for NOP emissions
This fixes a performance regression wrt the old NOP emission handler.
This commit is contained in:
parent
b05ea89d0c
commit
2d6502f67b
@ -701,7 +701,7 @@ node_update_single_va_closure (SignalNode *node)
|
||||
|
||||
/* Fast path single-handler without boxing the arguments in GValues */
|
||||
if (G_TYPE_IS_OBJECT (node->itype) &&
|
||||
(node->flags & (G_SIGNAL_NO_RECURSE|G_SIGNAL_MUST_COLLECT)) == 0 &&
|
||||
(node->flags & (G_SIGNAL_MUST_COLLECT)) == 0 &&
|
||||
(node->emission_hooks == NULL || node->emission_hooks->hooks == NULL))
|
||||
{
|
||||
GSignalFlags run_type;
|
||||
@ -3158,6 +3158,11 @@ g_signal_emit_valist (gpointer instance,
|
||||
return;
|
||||
}
|
||||
|
||||
/* Don't allow no-recurse emission as we might have to restart, which means
|
||||
we will run multiple handlers and thus must ref all arguments */
|
||||
if (closure != NULL && node->flags & (G_SIGNAL_NO_RECURSE) != 0)
|
||||
fastpath = FALSE;
|
||||
|
||||
if (fastpath)
|
||||
{
|
||||
SignalAccumulator *accumulator;
|
||||
|
Loading…
x
Reference in New Issue
Block a user