-
Notifications
You must be signed in to change notification settings - Fork 31
CI: Cache/restore the npm network/package cache #43
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
Conversation
e1929b3
to
6805390
Compare
861ded2
to
e1e2c0b
Compare
For the historical record: to the best of my knowledge, this PR was at commit 861ded2 before #46 was merged into For convenience (and to keep that commit and its parents from being pruned), this branch exists to mark said commit, at least for now: |
I'm not sure this had any benefit. I think we can close? @aminya if you don't mind I say we should close this. |
Let's wait until we merge #50. I want to test and see if any time is saved. |
6805390
to
06306b0
Compare
06306b0
to
cd3a463
Compare
This saves/restores the caches of just the packages as source code. Not the installed and/or compiled versions, which are in node_modules. (We have already been caching those for some time now.) Co-Authored-By: deedeeg <[email protected]>
No need to "save time on network access" if there won't be any network access at all! Co-Authored-By: deedeeg <[email protected]>
e1e2c0b
to
ee770ef
Compare
c1f57f2
to
72c1d79
Compare
This does not seem to have any benefits. I will close this. |
This saves/restores the caches of just the packages.
(Not the installed and/or compiled versions, which are in node_modules;
We have already been caching those for some time now.)
Requirements for Adding, Changing, or Removing a Feature
Requirements for Adding, Changing, or Removing a Feature
Issue or RFC Endorsed by Atom's Maintainers
Discussed here: #33 (comment)
Description of the Change
Cache not only the post-install
node_modules
folder, which we have been caching for some time now, but also the pre-install package/network cache thatnpm
stores the packages from the registry in. This cache is there so you don't have to wait for your network connection to the registry, but can pull previously fetched packages straight from the hard disk.In this case, caching it moves the network hit to "somewhere else in the Azure DevOps servers", which should hopefully be faster than hitting the npm registry.
Alternate Designs
Don't do this, and keep doing what we've been doing.
I'm trying this because I want to see if it is, in fact, faster. It's an experiment.
Possible Drawbacks
Could be slower than just hitting the npm package registry.
Or this could somehow be unreliable or add undesirable complexity. However, the
Cache@2
task is very well-behaved, being more likely to gracefully step out of the way and not do anything if it can't fully restore a cache. And npm fairly heavily validates everything that goes into/come out of the cache. So hopefully there's no issue with keeping the network/package cache around for multiple runs.Verification Process
Watch CI and see what happens.
Release Notes
N/A