Open jessehouwing opened 4 years ago
This is probably a architectural choice to not accidentally corrupt the cache directory, but the additional copy step adds a significant amount of time to each build (especially on the hosted agents).
The process one should follow:
- Download payload
- Extract to temp location
Use Tool Lib to cache the bits
- copies all contents from temp to the _tools folder on the agent.
This wastes about 34 seconds when using the
UseNode
task for example:2020-04-23T08:41:16.3375719Z Caching tool: node 10.20.1 x64 2020-04-23T08:41:50.2986887Z Prepending PATH environment variable with directory: C:\hostedtoolcache\windows\node\10.20.1\x64
And on the Hosted agent it makes no sense at all, since the image is destroyed after the build completes. There is zero benefit, apart from consistency, in populating the
_tools
folder.Options:
- Detect this is a throw-away image and skip the copy step, adding the path directly to the temp location.
- Extract directly into the
_tools
directory, possibly use marker files to signal success.
#
This is probably a architectural choice to not accidentally corrupt the cache directory, but the additional copy step adds a significant amount of time to each build (especially on the hosted agents).
The process one should follow:
This wastes about 34 seconds when using the
UseNode
task for example:And on the Hosted agent it makes no sense at all, since the image is destroyed after the build completes. There is zero benefit, apart from consistency, in populating the
_tools
folder.Options:
_tools
directory, possibly use marker files to signal success.