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

Simplify Http.Diagnostics #6174

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

pentp
Copy link
Contributor

@pentp pentp commented Mar 21, 2025

Reduce allocations, remove unnecessary code and some dependencies.

Microsoft Reviewers: Open in CodeFlow

{
requestRouteAsSpan = requestRouteAsSpan.Slice(1);
route = route.Substring(1);
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this now possibly increasing allocation? Same below?

I'm not clear on why this is an improvement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really since previously requestRouteAsSpan.ToString() was called on the span always, even if it was initialized from a string or even a constant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants