Improve Tree::closest_peers function #44
Labels
status:minor
Low priority improvements
team:WebTech
End to End UX / UI and blockchain
type:enhancement
Issues concerning code or feature improvement (performance, refactoring, etc)
Describe what you want implemented
Redesign the function in charge of find the closest peers related to an ID.
Describe "Why" this is needed
The actual implementation is sorting the whole content of all buckets inside the
Tree
.This can be a performance bottleneck in case of full network allocation.
Consider to find closest peers starting from target's adjacent buckets and to iteratively move step aside if they're empty.
Describe alternatives you've considered
Keep going with the actual implementation
Additional context
Add any other context or screenshots about the feature request here.The text was updated successfully, but these errors were encountered: