dotnet new is slow with 3.0 sdk
See original GitHub issuedotnet new
takes much longer with 3.0 sdk. From less than half a second with 2.2, to more than 3 seconds with 3.0:
$ dotnet --version
2.2.108
$ time dotnet new console --no-restore
The template "Console Application" was created successfully.
real 0m0.416s
user 0m0.395s
sys 0m0.039s
$ dotnet --version
3.0.100-preview8-013656
$ time dotnet new console --no-restore
The template "Console Application" was created successfully.
real 0m3.369s
user 0m0.847s
sys 0m0.070s
The message The template "Console Application" was created successfully.
appears as fast, but then the program still idle for some time.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Net SDK 3 performance
Hello On my tests, doing a very simple example (100.000 times storing and retrieving a string on the Couchbase server) i saw major ......
Read more >net core 7 web api very slow first call more that 32s
Hi, I have a problem in EF7 with core 7 web api. The first call take more that 30s and the second call...
Read more >Performance Improvements in .NET Core 3.0
NET Core 3.0 includes new hardware intrinsics that allow a properly-motivated developer to eke out the best possible performance on ...
Read more >Performance Improvements in .NET 7
NET 7 is fast. Really fast. This post deep-dives into hundreds of performance improvements that contributed to that reality.
Read more >What's new in .NET Core 3.0
This article describes what is new in .NET Core 3.0. One of the biggest enhancements is support for Windows desktop applications (Windows only)....
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
@git-Charlie here is the place in the code: https://github.com/dotnet/templating/blob/v3.1.4/src/Microsoft.TemplateSearch.Common/BlobStoreSourceFileProvider.cs#L33
So setting
DOTNET_NEW_LOCAL_SEARCH_FILE_ONLY
env variable to1
disables the update check.But still… The json returned looks like the whole template package list. So it will work slower with every new community project template added (at least because of more data transferred). Is it expected?
BTW. I’m ready to contribute the fix if smbd from the project team confirms the way to improve the tool (@KathleenDollard). Maybe something like checking updates no more than once per day?
This has been addressed in .NET 6 Preview 4, this are major changes here:
We also plan to add option to disable checking for update.