common/json: only maintain array of nested types if DEVELOPER mode.

My test case is a mainnet gossip store with 22107 channels, and
time to do `lightning-cli listchannels`:

Before: `lightning-cli listchannels` DEVELOPER=0
	real	0m1.396000-1.409000(1.4022+/-0.005)s

After:
	real	0m1.307000-1.320000(1.3128+/-0.005)s

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-10-19 11:47:48 +10:30
parent 20bed28759
commit 8238fe6acf
3 changed files with 47 additions and 26 deletions

View File

@@ -8,6 +8,7 @@
#include <ccan/tal/str/str.h>
#include <common/configdir.h>
#include <common/json.h>
#include <common/memleak.h>
#include <common/utils.h>
#include <common/version.h>
#include <stdio.h>