Parallelize `ChannelMonitor` loading from async `KVStore`s
Reading `ChannelMonitor`s on startup is one of the slowest parts of
LDK initialization. Now that we have an async `KVStore`, there's no
need for that, we can simply paralellize their loading, which we do
here.
Sadly, because Rust futures are pretty unergonomic, we have to add
some `unsafe {}` here, but arguing its fine is relatively
straightforward.
Based on #4146 just cause I don't want to resolve conflicts.
🎉 This PR is now ready for review! Please choose at least one reviewer by assigning them on the right bar. If no reviewers are assigned within 10 minutes, I'll automatically assign one. Once the first reviewer has submitted a review, a second will be assigned if required.
Codecov Report
:x: Patch coverage is 47.58065% with 65 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 89.35%. Comparing base (765e43d) to head (f2b14fb).
:warning: Report is 24 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #4147 +/- ##
==========================================
- Coverage 89.36% 89.35% -0.01%
==========================================
Files 180 180
Lines 139366 139712 +346
Branches 139366 139712 +346
==========================================
+ Hits 124547 124843 +296
- Misses 12227 12276 +49
- Partials 2592 2593 +1
| Flag | Coverage Δ | |
|---|---|---|
| fuzzing | 35.10% <0.00%> (-0.08%) |
:arrow_down: |
| tests | 88.69% <47.58%> (-0.02%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
This doesn't actually work. monitor loading is (at least for a semi-local disk) CPU-bound, so we really need to spawn each monitor load task rather than having one task.
This requires GATs which requires an MSRV bump (to 1.64), but we're planning on doing that soon anyway.
🔔 1st Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 2nd Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 3rd Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 4th Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 5th Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 6th Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 7th Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 8th Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 9th Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 10th Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 11th Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 12th Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 13th Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
Rebased on #4175, which avoids some further conflicts.
Marking draft until the parent is marged.
Okay this is ready now.
🔔 1st Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 2nd Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 3rd Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 4th Reminder
Hey @jkczyz! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
👋 The first review has been submitted!
Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer.