-
Notifications
You must be signed in to change notification settings - Fork 407
Reduce common allocations across the codebase #2708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
TheBlueMatt
merged 12 commits into
lightningdevkit:main
from
TheBlueMatt:2023-11-less-graph-memory-frag
Nov 13, 2023
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c0107c6
Reduce on-startup heap frag due to network graph map/vec doubling
TheBlueMatt abee51b
Prefer `Writeable.encode()` over `VecWriter` use
TheBlueMatt 1455452
Pre-allocate send buffer when forwarding gossip
TheBlueMatt e09afaf
Avoid unnecessarily overriding `serialized_length`
TheBlueMatt e4c6b70
Pre-allocate the full `Vec` prior to serializing as a `Vec<u8>`
TheBlueMatt 5e34bc4
Add an option to in-place decrypt with `ChaCha20Poly1305`
TheBlueMatt 48edd01
Avoid unnecessarily alloc'ing a new buffer when decrypting messages
TheBlueMatt 0503df8
Use `VecDeque`, rather than `LinkedList` in peer message buffering
TheBlueMatt 969085b
Avoid re-allocating to encrypt gossip messages when forwarding
TheBlueMatt 18dc7f2
Avoid a `tokio::mpsc::Sender` clone for each P2P send operation
TheBlueMatt a8d4cfa
Avoid allocating when checking gossip message signatures
TheBlueMatt 7a951b1
Stop writing signer data as a part of channels
TheBlueMatt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: why did we used to write them?
So, nowadays we write channel_keys_id instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used to write them because we didn't really have a fully-formed concept for how key derivation was supposed to work. Now we do and writing the signers is just redundant.