KEMBAR78
Avoid multiple enumeration when writing Json objects by Erarndt · Pull Request #5592 · NuGet/NuGet.Client · GitHub
Skip to content

Conversation

@Erarndt
Copy link
Contributor

@Erarndt Erarndt commented Jan 12, 2024

Bug

Fixes: NuGet/Home#13151

Regression? Last working version:

Description

The multiple enumeration is causing a significant amount of duplicate work. We can restructure the calls so that the enumeration only happens once which will reduce both CPU usage and memory 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 12, 2024 19:20
@ghost ghost added the Community PRs created by someone not in the NuGet team label Jan 12, 2024
@ghost ghost added the Status:No recent activity PRs that have not had any recent activity and will be closed if the label is not removed label Jan 19, 2024
@ghost
Copy link

ghost commented Jan 19, 2024

This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 90 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch.

@jeffkl jeffkl removed the Status:No recent activity PRs that have not had any recent activity and will be closed if the label is not removed label Jan 29, 2024
@jeffkl jeffkl self-assigned this Jan 29, 2024
@jeffkl jeffkl merged commit 7fb2b60 into NuGet:dev Feb 1, 2024
@Erarndt Erarndt deleted the dev-erarndt-JsonObjectWriter branch February 1, 2024 18:25
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.

Calls in SetWarningProperties() have allocation overhead due to multiple enumeration

2 participants