Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Caching of modules on CI #285

Closed
Lykhoyda opened this issue Feb 16, 2023 · 3 comments
Closed

Caching of modules on CI #285

Lykhoyda opened this issue Feb 16, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Lykhoyda
Copy link
Contributor

Lykhoyda commented Feb 16, 2023

Describe the bug
We implemented the caching for ci using actions/setup-node@v3 GitHub action. During the step run "Install dependency", it still takes near 30 seconds to finish the step. Per my understanding, if modules are cached it should take much less for execution.
We could try to configure the cache using https://github.com/marketplace/actions/cache to see if there is any difference. It's adding at least more information about the caching.

To Reproduce
see the jobs and step "Install deps"
https://github.com/ChainSafe/dappeteer/actions/runs/4175040807/jobs/7229413988

@Lykhoyda Lykhoyda added the bug Something isn't working label Feb 16, 2023
@mpetrunic
Copy link
Member

There is more steps then just fetching modules. It takes the 30s because downloading 0.5Gb is not instant + yarn resolution and post-building steps.

@Lykhoyda
Copy link
Contributor Author

Lykhoyda commented Feb 17, 2023

I'm focusing on the step "Install deps" where we clearly have one command:

yarn --prefer-offline --frozen-lockfile

The cache is 146 MB and should be read from the disk. Wherever we have this step in other jobs it still takes 20-34 seconds to finish.
In the cache output we see the reading speed of 36 MB per second:

Received 75241672 of 75241672 (100.0%), 36.5 MBs/sec
Cache Size: ~72 MB (75241672 B)

@Lykhoyda
Copy link
Contributor Author

I think I'm not the only one confused. These articles can clarify the way it works. We can close the issue:

actions/setup-node#304
https://stackoverflow.com/questions/70201071/setup-node-restoring-cache-but-still-takes-a-while-to-yarn

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants