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

Remove char[] allocations from RegistryKey and List copy to Array #78737

Merged
merged 3 commits into from Dec 5, 2022

Conversation

Poppyto
Copy link
Contributor

@Poppyto Poppyto commented Nov 22, 2022

This is a rewrote of closed PR #78558 - because of the merge #77996.

Replace List by string[] to avoid List.ToArray() copy (it must handle rare cases where there are more or less elements during the loop).
Avoid redondant verification EnsureNotDisposed() already called by SubKeyCount & ValueCount.

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Nov 22, 2022
@ghost
Copy link

ghost commented Nov 22, 2022

Tagging subscribers to this area: @dotnet/area-microsoft-win32
See info in area-owners.md if you want to be subscribed.

Issue Details

This is a rewrote of closed PR #78558 - because of the merge #77996.

Replace List by string[] to avoid List.ToArray() copy (it must handle rare cases where there are more or less elements during the loop).
Avoid redondant verification EnsureNotDisposed() already called by SubKeyCount & ValueCount.

Author: Poppyto
Assignees: -
Labels:

area-Microsoft.Win32

Milestone: -

@Poppyto Poppyto changed the title Registryperfs Remove char[] allocations from RegistryKey and List copy to Array Nov 22, 2022
Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@stephentoub stephentoub merged commit d47a24c into dotnet:main Dec 5, 2022
@dotnet dotnet locked as resolved and limited conversation to collaborators Jan 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Microsoft.Win32 community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants