Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NuGet.ContentModel consumes too much memory for string operations #4714

Closed
jainaashish opened this issue Feb 28, 2017 · 1 comment
Closed
Assignees
Labels
Milestone

Comments

@jainaashish
Copy link
Contributor

internal bug# 385896

NuGet.contentmodel allocates ~500mb out of 1.3gb string allocation for a customer scenario as mentioned in the internal bug.

Some of the stack trace from PerfView:

Name Inc % Inc
Type System.String 20.5 1,338,334,336

  • clr!? 20.5 1,338,334,208
  • mscorlib.ni 20.0 1,305,615,104
    |+ nuget.contentmodel 4.1 269,299,840
    |+ ?!? 1.9 122,823,536
    |+ microsoft.build.ni!Microsoft.Build.Shared.FileUtilities+ItemSpecModifiers.GetItemSpecModifier(System.String, System.String, System.String, System.String, System.String ByRef) 1.7 107,955,696

Pointers in code to look at some of string manipulations:

https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.ContentModel/Infrastructure/Parser.cs#L26
https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.ContentModel/Infrastructure/Parser.cs#L99
https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.ContentModel/Infrastructure/Parser.cs#L137

@jainaashish jainaashish added this to the Future-1 milestone Feb 28, 2017
@jainaashish jainaashish self-assigned this Feb 28, 2017
@jainaashish jainaashish modified the milestones: 4.4, Future-1 Aug 17, 2017
@jainaashish
Copy link
Contributor Author

It's fixed as part of NuGet/NuGet.Client#1590

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant