-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Skip dotnet-install #40551
Skip dotnet-install #40551
Conversation
/cc @adityamandaleeka @dotnet/aspdoi |
$runtimePath = $runtimePath + "\" + $version | ||
|
||
if (Test-Path $runtimePath) { | ||
$installSuccess = $true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not own these files. They're automatically updated whenever we get a new version of Arcade. If you want to skip dotnet installations, create a PR in dotnet/Arcade.
Besides that, this approach will usually save only the download of the dotnet-install.*
script (if it's not cached in .dotnet/) and a check of the *productVersion.txt
file for whatever is being installed.
What problem are you trying to solve❔
From the PR description, it seems everything is already installed in your case. The scripts avoided any time-consuming downloads. |
I know, I mentioned we can't merge that PR for this reason. I want a discussion only.
These files are cached already with my tests. It's 10 secs on script execution.
It's taking 10s of my life every time I start a build |
Looks like it's the invocation of the script that is very slow, the dotnet-install script run by itself is very fast when the runtime is already installed. |
@sebastienros is this something still relevant? |
I still believe this is something we should look to improve build times. |
@sebastienros Are you still seeing this behavior? I just tried it and didn't see any time difference on my machine with/without the change (I did consecutive unchanged builds of src\Servers\Kestrel). If this is still happening for you, I recommend we start a discussion with the Arcade folks about it instead of just keeping this PR open. |
I checked, investigated, found more details and I confirm it's still a problem and this PR is helping. |
For those watching this issue, it was fixed by @RussKie in Arcade dotnet/arcade#13359 |
Nice! |
Whenever I build locally it tries to install all the required runtimes even if they are present. It seems like dotnet-install is not very optimal in verifying it's already done. This change will skip dotnet-install if we know the runtime is already there. On my machine it saves 10 seconds on each build.
We can't merge this PR but this is to get some feedback.
Before
After