Skip to content

Conversation

@bgrainger
Copy link
Contributor

@bgrainger bgrainger commented Jun 17, 2022

Description

I was tracing an application with dotMemory and noticed a huge amount of temporary object[] being allocated by EventRoute.InvokeHandlersImpl.

image

This particular application had attached a listener to PresentationTraceSources.RoutedEventSource to trace some diagnostic information. While it's expected that doing so will add some overhead, it shouldn't be this great.

Customer Impact

Merging this PR will greatly reduce allocations for customers whose applications add a listener to PresentationTraceSources.RoutedEventSource.Listeners.

Regression

No.

Testing

Tested with dotMemory after shipping this fix in https://github.com/Faithlife/wpf.

Risk

Minimal.

Microsoft Reviewers: Open in CodeFlow

@bgrainger bgrainger requested a review from a team as a code owner June 17, 2022 22:26
@ghost ghost assigned bgrainger Jun 17, 2022
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Jun 17, 2022
@ghost ghost requested review from SamBent, dipeshmsft and singhashish-wpf June 17, 2022 22:26
@ghost ghost added the Community Contribution A label for all community Contributions label Jun 17, 2022
@singhashish-wpf singhashish-wpf added DrtsPassed Smoke tests (DRTs passed) and removed DrtsPassed Smoke tests (DRTs passed) labels Jun 21, 2022
@dipeshmsft
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rchauhan18
Copy link
Contributor

Thank you @bgrainger for the contribution.

@bgrainger bgrainger deleted the traceroutedevent-allocations branch September 9, 2023 00:58
@ghost ghost locked as resolved and limited conversation to collaborators Oct 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Community Contribution A label for all community Contributions PR metadata: Label to tag PRs, to facilitate with triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants