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

Issue for Memory (A lot of Memory is being consumed by `StreamReader.ReadToEnd...) #5

Open
jkalis-MS opened this issue May 1, 2024 · 0 comments

Comments

@jkalis-MS
Copy link
Collaborator

jkalis-MS commented May 1, 2024

Description: A lot of Memory is being consumed by StreamReader.ReadToEnd().

Current condition: 8% of your Memory was spent in StreamReader.ReadToEnd called from eShop.Catalog.API.Infrastructure.CatalogContextSeed.SeedAsync. We expected this value to be <3%.

Recommendations: If the underlying stream is expected to be in JSON format, consider using a JSON parser directly over the stream rather than reading ...

Call Stack:

Type System.Char[]
System.Private.CoreLib!System.Text.StringBuilder.ExpandByABlock(int32)
System.Private.CoreLib!System.Text.StringBuilder.AppendWithExpansion(wchar&,int32)
System.Private.CoreLib!System.Text.StringBuilder.Append(wchar[],int32,int32)
System.Private.CoreLib!System.IO.StreamReader.ReadToEnd()
System.Private.CoreLib!System.IO.File.ReadAllText(class System.String,class System.Text.Encoding)
Catalog.API!eShop.Catalog.API.Infrastructure.CatalogContextSeed+d__5.MoveNext()
System.Private.CoreLib!System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start(!!0&)
System.Private.CoreLib!System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start(!!0&)
Catalog.API!eShop.Catalog.API.Infrastructure.CatalogContextSeed.SeedAs

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

No branches or pull requests

1 participant