-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Spanify AntiFormat function in AvTrace, decrease allocations, improve perf #9361
Conversation
@h3xds1nz the PR looks good to be merged, can you please resolve the merge conflicts? |
…ilder with worst-case capacity
05108d4
to
63b10e2
Compare
@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:
|
Sure, I will start working on that PR soon 😊 and thank you for your contribution as well! |
@siagupta0202 Thank you, glad to hear :) |
Description
Improves performance of the
AntiFormat
function inAvTrace
, reducing allocations and improving the overall performance up to 2 times in some cases. Also changesFormatChars
fromchar[]
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
StringBuilder
default 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