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

Reduce string allocs by networking #6971

Merged
merged 2 commits into from
May 2, 2024
Merged

Reduce string allocs by networking #6971

merged 2 commits into from
May 2, 2024

Conversation

benaadams
Copy link
Member

@benaadams benaadams commented May 2, 2024

Changes

  • Use IPAddress comparision rather than string comparision
  • Use ReadOnlySpan Utf8 comparision rather than materializing string
  • Lazy create Host, Port strings in Node
  • Pre-calucate common Port strings

Bunch of unnessary strings being created

image image

Types of changes

What types of changes does your code introduce?

  • Optimization

Testing

Requires testing

  • No

@benaadams benaadams merged commit 89c321e into master May 2, 2024
67 checks passed
@benaadams benaadams deleted the string-allocs branch May 2, 2024 22:43
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