mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
0b7897302e
@whitslack complained of large CPU usage by connectd at startup; I ran perf record on connectd on my machine (which sees a little spike, only) and I see the cost of reading and discarding the entries: ``` - 95.52% 5.24% lightning_conne lightning_connectd [.] gossip_store_next - 90.28% gossip_store_next + 40.27% tal_alloc_arr_ + 22.78% tal_free + 11.74% crc32c + 9.32% fromwire_peektype + 4.10% __libc_pread64 (inlined) 1.70% be32_to_cpu ``` Much of this is caused by the search for our own gossip: keeping this separately would be even better, but this fix is minimal. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Fixed: connectd: reduce initial CPU load when connecting to peers. |
||
---|---|---|
.. | ||
test | ||
broadcast.h | ||
gossip_generation.c | ||
gossip_generation.h | ||
gossip_store_wire.csv | ||
gossip_store.c | ||
gossip_store.h | ||
gossipd_peerd_wire.csv | ||
gossipd_wire.csv | ||
gossipd.c | ||
gossipd.h | ||
Makefile | ||
queries.c | ||
queries.h | ||
routing.c | ||
routing.h | ||
seeker.c | ||
seeker.h |