Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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.

… rare cases where there are more or less elements during the loop).
@ghost ghost added area-Microsoft.Win32 community-contribution Indicates that the PR has been added by a community member labels 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
@ghost ghost 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.

2 participants