Skip to content

Improve Tree::closest_peers function #44

Description

@herr-seppia

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:minorLow priority improvementsteam:WebTechEnd to End UX / UI and blockchaintype:enhancementIssues concerning code or feature improvement (performance, refactoring, etc)

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions