common: don't enable steal loop checking unless we're doing memleak checking.

Before:
92.26076173782349
91.9576666355133
90.92732524871826

After:
90.5989830493927
88.10309219360352
90.07689118385315
This commit is contained in:
Rusty Russell
2025-05-08 12:20:47 +09:30
parent 3cd589d2ce
commit b387b26cb3

View File

@@ -222,8 +222,11 @@ bool daemon_developer_mode(char *argv[])
kill(getpid(), SIGSTOP);
}
/* This checks for any tal_steal loops! */
add_steal_notifiers(NULL);
/* This checks for any tal_steal loops, but it's not free:
* only use if we're already using the fairly heavy memleak
* detection. */
if (getenv("LIGHTNINGD_DEV_MEMLEAK"))
add_steal_notifiers(NULL);
return true;
}