-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Modify AvTrace call chain to use params ReadOnlySpan<object> instead of an array #9468
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
Modify AvTrace call chain to use params ReadOnlySpan<object> instead of an array #9468
Conversation
src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/AvTrace.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/AvTrace.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/AvTrace.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/AvTrace.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/AvTrace.cs
Outdated
Show resolved
Hide resolved
Hi there! Could you please update us on the status of this pull request? It's important for DevExpress components, and we're eager to know if you plan to merge it. |
Hey @Alexgoon, I'm gonna CC a few guys from the wpf team just to be sure it doesn't get lost. |
Hi again, |
@Alexgoon - We will be including this PR for upcoming test cycles, and it will go in for .NET 10. |
@pchaurasia14, thanks for the clarification! We were hoping the PR would be merged into .NET 9 since it addresses the issue described in #9467, which surfaced in .NET 9. After migrating to the latest version, a lot of our memory-related tests started failing. I also noticed another PR (#9463) that might help resolve the memory leak issue. Do you have any plans to merge it into .NET 9, or will the memory issue (#9467) be handled as part of another fix? |
@siagupta0202 Any news on this one? |
Hey @h3xds1nz, I was involved with some other tasks so couldn't take a look at this PR. I will review this soon. |
3c7d98e
to
7e26b70
Compare
@siagupta0202 Rebased so we can get this done finally. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9468 +/- ##
===================================================
+ Coverage 10.95887% 10.96633% +0.00746%
===================================================
Files 3310 3310
Lines 664667 664388 -279
Branches 74667 74666 -1
===================================================
+ Hits 72840 72859 +19
+ Misses 590685 590389 -296
+ Partials 1142 1140 -2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
LGTM, @h3xds1nz can you resolve the merge conflicts? |
7e26b70
to
9cc4c86
Compare
@siagupta0202 Done, sorry for the delay :) |
@h3xds1nz Thank you so much for your contribution! |
@siagupta0202 So happy to see this one in :) Thanks! |
Fixes #9467 Reference #9463
Description
More of a complex fix, modifies the call chain to make use of the latest .NET features.
I've usedSpan<object>
instead ofReadOnlySpan<object>
as theparameters
array has always been mutated by the trace class, hence I didn't want to currently change the behaviour.ArrayList
replaced with pre-allocated array and used interpolation for building the trace data.AvTraceMessages.tt
for completion.AvTrace
/AvTraceMessages
will be greatly reduced.Customer Impact
Improved performance when tracing is active, decreased array allocations per each executed trace, smaller assemblies due to the function removal.
Regression
Fixes the ref held by
_traceArguments
from #6700Testing
Local build, app run with tracing, comparing outputs of release/PR.
Risk
Low, the actual change is small and was reviewed/tested.
Microsoft Reviewers: Open in CodeFlow