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

poc: Refactor Kad Engine to poll based implementation #306

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

lexnv
Copy link
Collaborator

@lexnv lexnv commented Dec 17, 2024

PoC to highlight the work needed to refactor KademliaEngine to a poll-based implementation.

Currently, the engine is busy polling the associated queries on every iteration of loop { tokio::select! }.
This leads to resource inefficiencies and delays in processing query events.

This PoC in combination with subp2p-exporer showed a best case scenario for 1000 peers discovered in Kusama of:

  • old implementation 39 seconds
  • new implementation 30 seconds
    The results are mixed, since some runs show no improvements, while others are only a few seconds better in the range of 34-36 seconds.

The PoC needs to be extended for all query types, it currently extends FindNone. No context waker optimizations are applied either.

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.

1 participant