-
Notifications
You must be signed in to change notification settings - Fork 256
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
[Bug]: Visual Studio Installed Packages page is slow to load #11923
Comments
Thank you for raising this issue. |
Hi @erdembayar, Thanks for the response. My solution at work has 83 packages. It takes 3 minutes for all 906 NuGet API requests to complete. Just increasing Waiting 3 minutes for those requests to complete really impacts my experience using NuGet. As a compromise, would you consider increasing In the meantime, as a workaround, I've found that by running a proxy (e.g. Fiddler with "Capture HTTPS CONNECTs" enabled) seems to bypass the Can you please elaborate on the ordering correctness and race condition issue? Thanks. |
Changing value here might affect another VS components because we share same resource (but mono or nuget.exe is not inside VS so they can go for 64 connections without issue), that is why didn't propose to change it last time during perf investigation. I'll ask again then let you know.
This is normal list, so when updating from multithread might cause issue, also tasks might not complete in correct order, I know what the fix is, only doesn't have time to get on it: |
@erdembayar Thanks for the explanation. In the diff,
The pattern is very similar to the one found here: https://github.com/NuGet/NuGet.Client/blob/f24bad0668193ce21a1db8cabd1ce95ba509c7f0/src/NuGet.Core/NuGet.Protocol/DependencyInfo/RegistrationUtility.cs#L65-L103
Thanks, I look forward to hearing the response! |
Yes, fixing orderings is not hard, same as you just found, it needs little bit more work on top of Task.WhenAll. |
Related - #11638 |
NuGet Product Used
Visual Studio Package Management UI
Product Version
Visual Studio 2022
Worked before?
No response
Impact
It bothers me. A fix would be nice
Repro Steps & Context
The Installed packages page in the Visual Studio Package Management UI can be slow to load.
Part of the reason for this slowness is
HttpClientHandler
'sMaxConnectionsPerServer
setting, which by default is 2.Increasing this value results in a much faster load time. In the attached video, setting
MaxConnectionsPerServer
to 20 reduces the time taken from ~42 seconds to ~14 seconds.max.connections.per.server.mp4
This can be further improved by changing
PackageMetadataResourceV3.GetMetadataAsync
to make its API requests concurrently. In the attached video, the time taken is further reduced to ~5 seconds.concurrent.metadata.mp4
The diff for these changes can be found here: mjolka/NuGet.Client@6da1317
This is the project file I used to test with:
Verbose Logs
No response
The text was updated successfully, but these errors were encountered: