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
Use a map container to store peers in tr_swarm
#5645
Conversation
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.
@tearfur looks like this PR is coupling two unrelated topics, the std::map
use here and the followup to the atom+port PR. Could you move the second category into a standalone PRs?
@ckerr Re-opened #5644 (comment) |
# Conflicts: # libtransmission/peer-mgr.cc
@ckerr PR's ready. |
Works as expected I guess |
…sts()` Before this commit, `tr_swarm.pool` is traversed twice: 1. Inside `tr_swarm::get_existing_atom()` 2. By `std::map::emplace()`
@ckerr Just letting you know I did a small refactor to prevent traversing the |
(Partially? Hopefully?) fixes #5610.
tr_swarm::get_existing_atom()
, the memberpool
oftr_swarm
was changed from a dequeue to a map.Notes: Improved libtransmission code to use less CPU.