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

HttpFileSystemBasedFindPackageByIdResource.ConsumeFlatContainerIndexAsync allocates significantly more than necessary #14095

Open
ToddGrun opened this issue Feb 11, 2025 · 0 comments
Labels
Priority:2 Issues for the current backlog. Tenet:Performance Performance issues Type:Bug

Comments

@ToddGrun
Copy link

NuGet Product Used

Other/NA

Product Version

VS 17.14

Worked before?

No response

Impact

It bothers me. A fix would be nice

Repro Steps & Context

This method accounts for 14% of all VS allocations in the CSharpEditingTests.ScrollingAndTyping speedometer test from VS startup until the first C# file is opened.

There are a couple behaviors that can be improved in this area.

  1. Use System.Text.Json for serialization instead of NewtonSoft
  2. PackageInfo.ContentUri is very infrequently used and is the cause of a large amount of allocations (I see it requested in < 0.1% of PackageInfo objects created). Defer calculation of this string until it's needed.

Below are highlighted the allocations which I think can be greatly reduced / removed

Image

Verbose Logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:2 Issues for the current backlog. Tenet:Performance Performance issues Type:Bug
Projects
None yet
Development

No branches or pull requests

3 participants