Skip to content

Commit c221139

Browse files
committed
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
1 parent 7f87c07 commit c221139

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

common/daemon.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,11 @@ bool daemon_developer_mode(char *argv[])
222222
kill(getpid(), SIGSTOP);
223223
}
224224

225-
/* This checks for any tal_steal loops! */
226-
add_steal_notifiers(NULL);
225+
/* This checks for any tal_steal loops, but it's not free:
226+
* only use if we're already using the fairly heavy memleak
227+
* detection. */
228+
if (getenv("LIGHTNINGD_DEV_MEMLEAK"))
229+
add_steal_notifiers(NULL);
227230

228231
return true;
229232
}

0 commit comments

Comments
 (0)