forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removes unnecessary allocations in shreds ingestion path
Ingesting shreds unnecessarily allocates a HashSet to remove invalid repair-meta: https://github.com/anza-xyz/agave/blob/0f56076a2/core/src/window_service.rs#L250 and a separate vector for repair flags: https://github.com/anza-xyz/agave/blob/0f56076a2/core/src/window_service.rs#L338-L341 Similarly Blockstore::insert_shreds (called in broadcast-stage to insert own shreds during leader slots), allocates a vector for repair flags: https://github.com/anza-xyz/agave/blob/0f56076a2/ledger/src/blockstore.rs#L1381 All can be avoided if blockstore insert_shreds api are updated to take an argument of type shreds: impl ExactSizeIterator<Item = (Shred, /*is_repaired:*/ bool)>,
- Loading branch information
1 parent
46b1f9a
commit fad5cb1
Showing
3 changed files
with
44 additions
and
69 deletions.
There are no files selected for viewing
This file contains 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 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 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