Skip to content

Commit bbb7e5f

Browse files
authored
removes redundant allocations when generating new gossip pull/push messages (#4882)
Instead of collecting the intermediate values into vectors: https://github.com/anza-xyz/agave/blob/2b0966de4/gossip/src/cluster_info.rs#L1311-L1318 https://github.com/anza-xyz/agave/blob/2b0966de4/gossip/src/cluster_info.rs#L1257-L1268 https://github.com/anza-xyz/agave/blob/2b0966de4/gossip/src/crds_gossip_pull.rs#L292-L302 gossip new_{push,pull}_requests can just return an iterator. This iterator can then be written directly to a PacketBatch, bypassing the unnecessary vector allocations.
1 parent f236b4b commit bbb7e5f

File tree

4 files changed

+205
-105
lines changed

4 files changed

+205
-105
lines changed

0 commit comments

Comments
 (0)