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

Optimize Gossip peers <=> topics map #251

Merged
merged 2 commits into from
Aug 7, 2022

Conversation

Nashatyrev
Copy link
Collaborator

With a large number of peers quadratic complexity of the AbstractRouter.getTopicPeers() method becomes a significant bottleneck.

  • Create the MultiBiMap class with O(1) access complexity
  • Use it in AbstractRouter

Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

LGTM.

@Nashatyrev Nashatyrev merged commit 85197b8 into develop Aug 7, 2022
@Nashatyrev Nashatyrev deleted the optimization/pubsub-peer-topic branch August 16, 2022 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants