Skip to content
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

perf: remove redundant fallback cleanup #13401

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Dec 14, 2024

similar as #13398

this scanned the fallback peers on every hash and cleaned up no longer connected peers.

this is entirely redundant because we only select active peers anyway

let TxFetchMetadata { fallback_peers, .. } =
self.hashes_fetch_inflight_and_pending_fetch.peek(&hash)?;
for peer_id in fallback_peers.iter() {
if self.is_idle(peer_id) && peers.contains_key(peer_id) {
return Some(peer_id)
}

so we don't need to do this

@mattsse mattsse added C-perf A change motivated by improving speed, memory usage or disk footprint A-networking Related to networking in general labels Dec 14, 2024
Copy link
Member

@rkrasiuk rkrasiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trust you that we don't need to do this, otherwise lgtm

@mattsse mattsse added this pull request to the merge queue Dec 16, 2024
Merged via the queue into main with commit 4405f1b Dec 16, 2024
43 checks passed
@mattsse mattsse deleted the matt/rm-redundant-fallback-cleanup branch December 16, 2024 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-networking Related to networking in general C-perf A change motivated by improving speed, memory usage or disk footprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants