You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SetCentralDependencies method writes out the PackageVersion items to the project.assets.json and uses the normalized version. This section is only read by our reader which parses it again during read so there's no need to allocate another string and instead should just write out the original string.
jeffkl
changed the title
PackageSpecWriter should write out original string for versions instead of allocating a new one (1.4% of high-GC sessions, 152 MB/s at worst)
PackageSpecWriter should write out original string for versions instead of allocating a new one
Jan 23, 2024
NuGet Product Used
MSBuild.exe, dotnet.exe
Product Version
All
Worked before?
No response
Impact
None
Repro Steps & Context
The
SetCentralDependencies
method writes out the PackageVersion items to theproject.assets.json
and uses the normalized version. This section is only read by our reader which parses it again during read so there's no need to allocate another string and instead should just write out the original string.https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.ProjectModel/PackageSpecWriter.cs#L668
Originally reported internally: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1828422
Verbose Logs
No response
The text was updated successfully, but these errors were encountered: