Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

cache NuGetEnvironment.GetFolderPath values - #6874

#6874
Merged
zivkan merged 2 commits into
devNuGet/NuGet.Client:devfrom
dev-zivkan-NuGetEnvironment-cachingNuGet/NuGet.Client:dev-zivkan-NuGetEnvironment-cachingCopy head branch name to clipboard
Oct 24, 2025
Merged

cache NuGetEnvironment.GetFolderPath values#6874
zivkan merged 2 commits into
devNuGet/NuGet.Client:devfrom
dev-zivkan-NuGetEnvironment-cachingNuGet/NuGet.Client:dev-zivkan-NuGetEnvironment-cachingCopy head branch name to clipboard

Conversation

@zivkan

@zivkan zivkan commented Oct 19, 2025

Copy link
Copy Markdown
Member

Bug

Fixes: NuGet/Home#14602

Description

Every NuGetFolderPath value does at least one string.Concat, and some parts of NuGet call into NuGetEnvironment without implementing caching themselves. While the cache itself uses some memory, the overall memory allocations should be significantly improved.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc. N/A

@zivkan
zivkan requested a review from a team as a code owner October 19, 2025 21:29
@zivkan
zivkan requested review from donnie-msft and jeffkl October 19, 2025 21:29
jeffkl
jeffkl previously approved these changes Oct 20, 2025
nkolev92
nkolev92 previously approved these changes Oct 20, 2025
@zivkan
zivkan force-pushed the dev-zivkan-NuGetEnvironment-caching branch from 3e31837 to a33d13c Compare October 22, 2025 08:32
@zivkan
zivkan dismissed stale reviews from jeffkl and nkolev92 via f4bb875 October 23, 2025 23:31
@zivkan
zivkan requested review from jeffkl and nkolev92 October 24, 2025 01:39
@zivkan
zivkan merged commit b5efdd1 into dev Oct 24, 2025
17 of 18 checks passed
@zivkan
zivkan deleted the dev-zivkan-NuGetEnvironment-caching branch October 24, 2025 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NuGetEnvironment.GetFolderPath should cache results

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.