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

Avoid string.Concat(params string[]) in SimpleConsoleFormatter.CreateDefaultLogMessage #44765

Merged
merged 1 commit into from
Nov 18, 2020

Conversation

stephentoub
Copy link
Member

@stephentoub stephentoub commented Nov 16, 2020

It's resulting in a string[] allocation and a string allocation, when we can instead just make a few more individual calls to Write. (The writer here is generally a StringWriter.)

Related to #44598

…DefaultLogMessage

It's resulting in a string[] allocation and a string allocation, when we can instead just make a few more individual calls to Write and stackalloc the integer.
@stephentoub stephentoub added this to the 6.0.0 milestone Nov 16, 2020
@ghost
Copy link

ghost commented Nov 16, 2020

Tagging subscribers to this area: @maryamariyan
See info in area-owners.md if you want to be subscribed.

Issue Details
Description:

It's resulting in a string[] allocation and a string allocation, when we can instead just make a few more individual calls to Write. (The writer here is generally a StringWriter.)

Author: stephentoub
Assignees: -
Labels:

area-Extensions-Logging, tenet-performance

Milestone: [object Object]

@stephentoub stephentoub merged commit 38259c8 into dotnet:master Nov 18, 2020
@stephentoub stephentoub deleted the simpleconsolewrite branch November 18, 2020 17:41
@ghost ghost locked as resolved and limited conversation to collaborators Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants