Skip to content
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

Fix lots of unnecessary XmlValueGetter delegate allocations #54344

Merged
merged 1 commit into from Jun 17, 2021

Conversation

stephentoub
Copy link
Member

@stephentoub stephentoub commented Jun 17, 2021

We already have the delegate to use. There's zero benefit and only cost to creating a new delegate for each call.

e.g. running the sample from https://docs.microsoft.com/en-us/dotnet/standard/data/xml/xml-schema-xsd-validation-with-xmlschemaset#validate-xml-documents 1000 times, this 36,000 drops to 1,000:
image

@ghost
Copy link

ghost commented Jun 17, 2021

Tagging subscribers to this area: @buyaa-n, @krwq
See info in area-owners.md if you want to be subscribed.

Issue Details

We already have the delegate to use. There's zero benefit and only cost to creating a new delegate for each call.

Author: stephentoub
Assignees: -
Labels:

area-System.Xml

Milestone: -

@stephentoub stephentoub merged commit 034986b into dotnet:main Jun 17, 2021
Triage POD for Meta, Reflection, etc automation moved this from Needs triage to Done Jun 17, 2021
@stephentoub stephentoub deleted the xmlvaluegetter branch June 17, 2021 23:57
@dotnet dotnet locked as resolved and limited conversation to collaborators Jul 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants