chocolatey-community / chocolatey-azuredevops

Chocolatey Extension for Azure DevOps
MIT License
21 stars 11 forks source link

Chocolatey execution on hosted build agent takes quite a while #60

Open gep13 opened 4 years ago

gep13 commented 4 years ago

It can take upwards of several minutes to run a Chocolatey command on a Hosted Azure Build Agent, and it can take over 6 minutes to force an installation of Chocolatey.

When running choco list -lo as an example, it seems to stall at the following point:

image

When forcing the installation of Chocolatey, it stalls at this point:

image

And then it succeeds:

image

Not sure exactly why these operations take so long, but think it is something on the build agent, rather than Chocolatey itself.

@flcdrg @ferventcoder any ideas on how to improve this?

ferventcoder commented 4 years ago

6 minutes?! My only guess is the download time? Do we know where it is stalling at?

ferventcoder commented 4 years ago

Oh - pending packages?! Yes, that is something that got a perf hit. Let me get you the PR and issue number - due to be released in Chocolatey v0.10.16.

ferventcoder commented 4 years ago

https://github.com/chocolatey/choco/pull/1941

gep13 commented 4 years ago

@ferventcoder The 6 minutes for the installation is pretty much spent the whole time stuck at the line that is shown on the screenshot, I.e. restricting write permissions.

ferventcoder commented 4 years ago

I see. Were there already files in the folders? That could seriously impact that time