-
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
Modify AvTrace call chain to use params ReadOnlySpan<object> instead of an array #9468
base: main
Are you sure you want to change the base?
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? |
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