routing: maintain in-memory graph for path finding #5389
Labels
beginner
Issues suitable for new developers
database
Related to the database/storage of LND
optimization
P2
should be fixed if one has time
routing
Milestone
As is, we'll end up going to disk each time we need to do path finding. This is slower due to the memory remappings, and explicit kernel <-> user context switches this causes. In addition, due to the nature of boltdb, if a read transaction is active, all write transactions are blocked, which may slow down other operations.
Rather than seek each time, we should instead retain a simple, minimal (shed all information from the edge not needed for path finding), in-memory graph based off the existing graph interface.
The new data-structure will need to be concurrent safe and also write through any updates of the graph to the on-disk persistent storage. A new flag should be added to gate this behavior.
The text was updated successfully, but these errors were encountered: