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

Use static variables for DNS resolver and crypto noise parameters #229

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lexnv
Copy link
Collaborator

@lexnv lexnv commented Sep 3, 2024

This PR uses std::sync::OnceLock to create reusable variables only once:

  • crypto/noise parameters are parsing the provided string only once
  • tokio DNS resolver uses the same variable to leverage the DNS internal caching

cc @paritytech/networking

@lexnv lexnv added the enhancement New feature or request label Sep 3, 2024
@lexnv lexnv self-assigned this Sep 3, 2024
@lexnv
Copy link
Collaborator Author

lexnv commented Oct 22, 2024

Updates

  • I've deprioritized this PR in favor of other refactoring and bug fixing work
  • planning to remove the statics, so I will leave this open for a while

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant