Spanify AntiFormat function in AvTrace, decrease allocations, improve perf#9361
Merged
Conversation
siagupta0202
previously approved these changes
Mar 31, 2025
Contributor
|
@h3xds1nz the PR looks good to be merged, can you please resolve the merge conflicts? |
…ilder with worst-case capacity
05108d4 to
63b10e2
Compare
Member
Author
|
@siagupta0202 Done, now if we could finally get #9468 done that would be wonderful. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9361 +/- ##
===================================================
+ Coverage 11.25210% 11.41679% +0.16469%
===================================================
Files 3353 3353
Lines 668062 668060 -2
Branches 74980 74980
===================================================
+ Hits 75171 76271 +1100
+ Misses 591642 590439 -1203
- Partials 1249 1350 +101
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
siagupta0202
approved these changes
Apr 1, 2025
Contributor
Sure, I will start working on that PR soon 😊 and thank you for your contribution as well! |
Member
Author
|
@siagupta0202 Thank you, glad to hear :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Improves performance of the
AntiFormatfunction inAvTrace, reducing allocations and improving the overall performance up to 2 times in some cases. Also changesFormatCharsfromchar[]toReadOnlySpan<char>, occurrence I've missed in #9230.Second commit features added documentation for the function. I've included some basic asserts at the Testing section.
Small strings within
StringBuilderdefault capacityBenchmark code
Large strings, mostly without any replacements
Benchmark code
Large strings, with replacements (up to two times the perf)
Benchmark code
Customer Impact
Improved performance, decreased allocations.
Regression
No.
Testing
Local build, base testing between the two functions.
Risk
Low.
Microsoft Reviewers: Open in CodeFlow