-
Notifications
You must be signed in to change notification settings - Fork 258
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
Please cache package search results while doing update package for multiple projects in solution! #5401
Comments
@TimLovellSmith do you get the same result when running For a single command all feed data should be cached between projects, you shouldn't see multiple GET requests for the same URL. From your log it looks like this may have an issue. |
Cache key consists of package, source, and target framwork... since your target framework is different for project1 vs project2 so it repeated the call and get package dependencies for that specific target. We can certainly improve this experience and improve our cache. Since first call itself will give all the details about package dependencies for each framework so we can always reuse that. |
We already have http cache working for packageReference based projects, this commit implements this http cache for packages.config based projects as well which will significantly improve install/ update performance. Fixes: NuGet/Home#5401
We already have http cache working for packageReference based projects, this commit implements this http cache for packages.config based projects as well which will significantly improve install/ update performance. Fixes: NuGet/Home#5401
We already have http cache working for packageReference based projects, this commit implements this http cache for packages.config based projects as well which will significantly improve install/ update performance. Fixes: NuGet/Home#5401
Me, my PC, and no doubt the NuGet.org servers thank you for attending to this issue! |
@jainaashish - thanks for getting this done. is this now working for only v3 sources or both v2/v3? looking at titles of PRs/Commits, I see both listed. |
This is now working for both V2 and V3 sources. |
Details about Problem
NuGet product used: VS UI
NuGet version (x.x.x.xxx): 3.5.01737
dotnet.exe --version (if appropriate): 1.0.0-preview2-003131 but does not apply for this scenario...
VS version (if appropriate): 2015 Update 3 (14.0.25431.01)
OS version (i.e. win10 v1607 (14393.321)): Server 2012 R2
Detailed repro steps so we can see the same problem
I have a giant solution with lots of packages and I want to update Nuget package for Newtonsoft.Json, so I go into the manage Nuget Packages for solution and select Newtonsoft.Json in the update UX and choose version 9.0.1 which is the latest stable minor version for major version 9. Then I hit go...
Problem: it takes too long! And I notice there's a particular inefficiency: the same HTTP requests are being done over and over again:
Attempting to gather dependency information for package 'Newtonsoft.Json.9.0.1' with respect to project [Project #1], targeting '.NETFramework,Version=v4.5'
GET https://api.nuget.org/v3/registration2-gz/newtonsoft.json/index.json
OK https://api.nuget.org/v3/registration2-gz/newtonsoft.json/index.json 69ms
GET https://api.nuget.org/v3/registration2-gz/windowsazure.storage/index.json
GET https://www.nuget.org/api/v2/FindPackagesById()?id='WindowsAzure.Storage'
GET https://www.nuget.org/api/v2/curated-feeds/microsoftdotnet/FindPackagesById()?id='WindowsAzure.Storage'
Attempting to gather dependency information for package 'Newtonsoft.Json.9.0.1' with respect to project [Project #2], targeting '.NETFramework,Version=v4.5.2'
GET https://api.nuget.org/v3/registration2-gz/newtonsoft.json/index.json
OK https://api.nuget.org/v3/registration2-gz/newtonsoft.json/index.json 231ms
snip
GET https://api.nuget.org/v3/registration2-gz/windowsazure.storage/index.json
Once its finished processing project #1 it does project #2 but its repeating the exact same HTTP requests here instead of using cached results - right?! GAAH no wonder this whole process takes like 15 minutes!
(And then to make matters worse it will also fail with errors about completely unrelated packages.. which I solve by temporarily commenting those packages out and doing it all again "One or more unresolved package dependency constraints detected in the existing packages.config file. All dependency constraints must be resolved to add or update packages.")
The text was updated successfully, but these errors were encountered: