dotnet restore performance problems
See original GitHub issueI recently converted a solution with around 65 C# projects, all in the new sdk-format, from nuget to paket. I used convert-from-nuget
, resolved the detected conflicts and did a paket simplify
. I also removed all but one version restriction.
- Paket.dependencies contains around 40 nuget packages
- frameworks are restricted to netstandard2.0, net47, netcoreapp2.0
- Storage is set to none.
- Paket version is 5.167.2
- Before building, i clean all obj and bin folders.
With nuget, a dotnet restore
took around 9 seconds.
With paket, the dotnet restore
takes around 1:30 min.
Is this expected or am i possibly doing something wrong?
Issue Analytics
- State:
- Created 5 years ago
- Comments:27 (20 by maintainers)
Top Results From Across the Web
Slow restore performance · Issue #18467 · dotnet/sdk
This environment variable seems to not have an effect on dotnet restore . Is there any possibility to turn off those revocation checks...
Read more >dotnet restore incredibly slow inside docker-compose build
If I cd into the directory and run dotnet restore , the packages are restored very quickly without any problems.
Read more >DotNet core slow restore : r/docker
16 votes, 13 comments. Hello, recently I'm facing a increase on the build time (+5 minutes from initial ~1 minute) when doing ....
Read more >Solving flaky dotnet restore issue only on Docker
Solving flaky dotnet restore issue only on Docker — Failed to retrieve information ... I've got stuck for a couple of days to...
Read more >Constant timeouts doing NuGet restore
Hello, I am running ProGet 5.3.21 in Docker against an Azure Sql Database. During a NuGet package restore, I continually see timeouts, to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We started having these performance problems after transitioning to .NET Core. I did some benchmarking and discovered that Paket performs more than 3 times slower than PackageReference on initial build and in builds that are run after
paket install
.The benchmarking was done in a Linux VM (4 CPU threads, 8 GB RAM, SSD). All the tests were run with populated local package cache, nothing was being downloaded over the network. Paket also used
storage: none
mode.All test results are available here
The long initial restore problem is especially annoying in Visual Studio or Rider. After switching from one branch to another with more dependencies, both IDEs start the restore process which takes even more time than the CLI restore, about twice as much.
I would say the dotnet CLI build time increase is tolerable but the slowdown in IDE workflows is a deal breaker.
Is there something that can be done to improve the restore times or is there a hard design decision that makes it infeasible?
I just stopped deleting the obj folders 😉. Although after switching branches, VS is sometimes not happy until i do a rebuild. If that does not really help with performance, its probably not worth it. About the task for two runtimes: if anybody is interested, this does kind of describe how to handle that case (you two probably know how that works, but i am not really versed in msbuild;)).