ElementsProject / lightning

Core Lightning — Lightning Network implementation focusing on spec compliance and performance
Other
2.81k stars 889 forks source link

libplugin-pay: use map for channel hints (on top of #7494) #7648

Open JssDWt opened 2 weeks ago

JssDWt commented 2 weeks ago

libplugin-pay: use map for channel hints (on top of #7494)

Description

This commit fixes a "FIXME: This is slow" in the pay plugin. For nodes with many channels this is a tremendous improvement in pay performance. PR https://github.com/ElementsProject/lightning/pull/7611 improves payment performance from 15 seconds to 13.5 seconds on one of our nodes. This commit improves payment performance from 13.5 seconds to 5.7 seconds.

Changes Made

Checklist

Ensure the following tasks are completed before submitting the PR:

Additional Notes

This PR builds on top of #7494 This is a replacement of #7636, because that PR conflicts with #7494