mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 15:44:21 +01:00
We spend quite a bit of time in libsecp256k1 moving them to and from DER encoding. With a bit of care, we can transfer the raw bytes from gossipd and manually decode them so a malformed one can't make us abort(). Before: real 0m0.629000-0.695000(0.64985+/-0.019)s After: real 0m0.359000-0.433000(0.37645+/-0.023)s At this point, the main issues are 11% of time spent in ccan/io's backend_wake (I tried using a hash table there, but that actually makes the small-number-of-fds case slower), and 65% of gossipd's time is in marshalling the response (all those tal_resize add up!). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>