Skip to content

4.0.2 Release#2118

Merged
nblumhardt merged 10 commits into
mainfrom
dev
Sep 28, 2024
Merged

4.0.2 Release#2118
nblumhardt merged 10 commits into
mainfrom
dev

Conversation

@nblumhardt

Copy link
Copy Markdown
Member

nblumhardt and others added 10 commits July 25, 2024 13:43
…alization for legacy (but still frequently used) MessageTemplateTextFormatter
…hods

Original StringWriter.Write/WriteLine(ReadOnlySpan<char>) methods are optimized only for the StringWriter type itself, not derived classes. For derived classes, these methods copy the provided Span to an array from ArrayPool and fall back to Write(char[], int, int) method for backward compatibility with code created before the Span type existed.

Explicit overrides in the ReusableStringWriter class that call StringBuilder.Append directly help to avoid the overhead of ArrayPool.Rent/Return and copying.
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