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

swarm/src/connection: Prioritize handler over connection #2626

Merged
merged 2 commits into from May 3, 2022

Conversation

mxinden
Copy link
Member

@mxinden mxinden commented May 2, 2022

Description

Prioritize work in handler over work on connection, thus prioritizing local work
over work coming from a remote.

I would like to make prioritizing local work over work coming from a remote a pattern throughout the codebase. More to come.

I will run this change on a larger machine to make sure it does not introduce any subtle errors.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates.
    • I don't think this change needs a call-out in the changelog.

Prioritize work in handler over work on connection, thus prioritizing local work
over work coming from a remote.
Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

Concept ACK

Was there a specific motivation for this change in prioritization?

@mxinden
Copy link
Member Author

mxinden commented May 3, 2022

Was there a specific motivation for this change in prioritization?

General theme of prioritizing local work over work from remote. I hope for this to improve both performance and security, though applying the pattern across the stack is likely required for that to show.

Thanks for the review @thomaseizinger!

@mxinden mxinden merged commit 3e1ed95 into libp2p:master May 3, 2022
@mxinden mxinden mentioned this pull request May 29, 2022
1 task
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.

None yet

2 participants