]> git.bitcoin.ninja Git - rust-lightning/commit
Don't clone Features during Dijkstras graph walk 2021-03-router-fuzz-check
authorMatt Corallo <git@bluematt.me>
Fri, 5 Mar 2021 02:42:42 +0000 (21:42 -0500)
committerMatt Corallo <git@bluematt.me>
Sat, 27 Mar 2021 22:10:55 +0000 (18:10 -0400)
commit6085998dfbe9ca60f428c32fa05700f1c886323c
treee8862c421316fe4a2bf2d677114c63d436c41176
parentf3c113cabdbb6d997719ab7eaad0e54ab4da0e5e
Don't clone Features during Dijkstras graph walk

We currently copy the features objects in each channel as we walk
the graph during route calculation. This implies a significant
amount of malloc traffic as the features flags object are stored
on the heap.

Instead, because they features being referenced are in the network
graph which we hold a reference to, we can simply store references
to them.

This nontrivially improves our get_route benchmark by around 5%.
lightning/src/routing/router.rs