KEMBAR78
Avoid boxing HashSet Enumerator in IsBestVerion by Erarndt · Pull Request #5588 · NuGet/NuGet.Client · GitHub
Skip to content

Conversation

@Erarndt
Copy link
Contributor

@Erarndt Erarndt commented Jan 11, 2024

Bug

Fixes: NuGet/Home#13146

Regression? Last working version:

Description

This change updates NoAllocEnumerate() to handle HashSet<T> to avoid these allocations.

image

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • Automated tests added
    • OR
    • Test exception
    • OR
    • N/A
  • Documentation

    • Documentation PR or issue filled
    • OR
    • N/A

@Erarndt Erarndt requested a review from a team as a code owner January 11, 2024 00:25
@ghost ghost added the Community PRs created by someone not in the NuGet team label Jan 11, 2024
@jeffkl jeffkl self-assigned this Jan 11, 2024
@jeffkl jeffkl merged commit 28f7ba7 into NuGet:dev Jan 12, 2024
@Erarndt Erarndt deleted the dev-erarndt-IsBestVersion branch January 12, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community PRs created by someone not in the NuGet team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IsBestVersion boxes HashSet<T> enumerators resulting in lots of allocation overhead during restore.

3 participants