Skip to content
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

[PERF] Extract directly to cache location #67

Open
jessehouwing opened this issue Apr 23, 2020 · 4 comments
Open

[PERF] Extract directly to cache location #67

jessehouwing opened this issue Apr 23, 2020 · 4 comments

Comments

@jessehouwing
Copy link

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:

  1. Detect this is a throw-away image and skip the copy step, adding the path directly to the temp location.
  2. Extract directly into the _tools directory, possibly use marker files to signal success.
@PAULNICEITISWHATITIS
Copy link

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:

  1. Detect this is a throw-away image and skip the copy step, adding the path directly to the temp location.
  2. Extract directly into the _tools directory, possibly use marker files to signal success.

@PAULNICEITISWHATITIS
This comment was marked as a violation of GitHub Acceptable Use Policies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@jessehouwing @max-zaytsev @PAULNICEITISWHATITIS and others