-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Cache decompression slow on Windows #442
Comments
|
I noticed that issue as well. I thought I could use the cache so I don't have to download the needed compilers and libraries for every run, but loading and extracting them from the cache takes way longer than just redownloading them. That makes the cache pretty useless for my use case. |
|
I also have this problem. I run the same job on Linux, macOS & Windows. And while macOS & Linux take less than 1 minutes, Windows takes almost 4 minutes. |
|
Yes, I meet this problem too, the Windows cost almost 5mins every cache. It really a time waste !!! |
|
Experienced the same issue on Windows. Here's the config I used: - name: Get yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Query yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}On On As you can see, that margin is extreme. |
|
I have experienced the same issue. Setting up a cache with a size of 800 MB takes 20 seconds on Ubuntu while the smaller 600 MB cache takes about 1 min. They use different commands which can be the reason for the slow decompression. I wonder if actions should use 7z on Windows instead of tar. /usr/bin/tar --use-compress-program zstd -d -xf /home/runner/work/_temp/123/cache.tzst -P -C /home/runner/work/proj/projC:\Windows\System32\tar.exe -z -xf D:/a/_temp/123/cache.tgz -P -C D:/a/proj/proj |
|
They have disabled zstd compression on Windows, and that is why Windows caching is so slow. Related to #301 |
|
Seeing the same thing. Here using And here on |
|
Also having a very slow cache restore operation for unzipped gradle-7.0.2-all.zip contents at the path |
|
I am seeing the same thing, it's just too slow! |
|
Just as an update: I just switched to |
|
@Safihre - Still to slow for me, even on windows-2022. See #752 (comment) |
|
Yeah, I also saw it in my runs. |
|
Hi @shichen85 @coreysharris @Safihre . As @aminya observed, TLDR; Add the following step to your workflow before the cache step. That's it. Hope this helps. |
|
For my project this makes it even slower.. Taking 1:20 min to unpack 35MB 😑 |
|
@Safihre could you share your workflow file or the sample run or logs if possible? |
|
@pdotl we use an action that caches a Python virtual environment, but under the hood that uses the actions/cache |
|
@Safihre I'm not sure what the issue is. I tried running a similar albeit simpler workflow to yours using the |
|
We are tracking this issue in #984. Please check the current proposal there and provide comments/feedback if any. Closing this as duplicate. |




For me decompression of a cache on Windows is much slower than on linux. A 360Mb cache takes
The cache consists of many small files (e.g. the boost library) which probably affects performance negatively.
It seems that appveyor switched to 7zip to compress/decompress the cache exactly for performance reasons. Maybe this would also be on option for github actions that run on windows?
Also note that there was already a similar issue (#336) but it was fixed by improving network performance. Here the bottleneck is not the network but the decompression itself...
The text was updated successfully, but these errors were encountered: