cache icon indicating copy to clipboard operation
cache copied to clipboard

takes extremely long to cache on windows

Open gucio321 opened this issue 1 year ago • 3 comments

It takes extremely long time to run this job (around 18 minutes?!) example run: https://github.com/AllenDang/giu/actions/runs/11592336860/job/32273983921?pr=898 this is a matrix os and it works normally on mac and ubuntu.

      - name: Cache Go modules
        uses: actions/cache@v4
        with:
          path: ~/go/pkg/mod
          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
          restore-keys: |
            ${{ runner.os }}-go-

gucio321 avatar Oct 30 '24 11:10 gucio321

I'm also experiencing this issue.

While maintaining Boost.Spirit, we're caching the whole Boost Libraries for the unit tests. It results in 300MB of archive with thousands of both plain text and binary files.

In our CI configuration I've observed that decompression on ubuntu-24.04 takes only 9 seconds, while on windows-2022 it takes 2 minutes (!).

I believe that the slowness comes from this command:

"C:\Program Files\Git\usr\bin\tar.exe" -xf D:/a/_temp/5187f064-1b8a-4607-96c4-7c266cbbf112/cache.tzst -P -C D:/a/spirit/spirit --force-local --use-compress-program "zstd -d"

https://github.com/boostorg/spirit/actions/runs/17599875272/job/49999812748?pr=824#step:8:18

I suspect that --use-compress-program "zstd -d" is painfully slow on Windows.

Can we at least have some configurable API that allows us to choose arbitrary algorithm? I'm aware that such suggestion was rejected on actions/toolkit#543, but we definitely have a use case for this.

saki7 avatar Sep 10 '25 01:09 saki7

No

On Wed, Sep 10, 2025, 05:17 Nana Sakisaka @.***> wrote:

saki7 left a comment (actions/cache#1490) https://github.com/actions/cache/issues/1490#issuecomment-3272859840

I'm also experiencing this issue.

While maintaining Boost.Spirit, we're caching the whole Boost Libraries for the unit tests. It results in 300MB of archive with thousands of both plain text and binary files.

In our CI configuration I've observed that decompression on ubuntu-24.04 takes only 9 seconds, while on windows-2022 it takes 2 minutes (!).

I believe that the slowness comes from this command:

"C:\Program Files\Git\usr\bin\tar.exe" -xf D:/a/_temp/5187f064-1b8a-4607-96c4-7c266cbbf112/cache.tzst -P -C D:/a/spirit/spirit --force-local --use-compress-program "zstd -d"

https://github.com/boostorg/spirit/actions/runs/17599875272/job/49999812748?pr=824#step:8:18

I suspect that --use-compress-program "zstd -d" is painfully slow on Windows.

Can we at least have some configurable API that allows us to choose arbitrary algorithm? I'm aware that such suggestion was rejected on actions/toolkit#543 https://github.com/actions/toolkit/issues/543, but we definitely have a use case for this.

— Reply to this email directly, view it on GitHub https://github.com/actions/cache/issues/1490#issuecomment-3272859840, or unsubscribe https://github.com/notifications/unsubscribe-auth/BTTGCXUXT7VVUALMLOJEM5L3R532XAVCNFSM6AAAAABQ36BPNKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENZSHA2TSOBUGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ranaaqil338 avatar Sep 10 '25 01:09 ranaaqil338

Related to https://github.com/actions/cache/issues/752 See https://github.com/actions/cache/issues/752#issuecomment-1847036770 and https://github.com/actions/cache/issues/752#issuecomment-2106299386 for possible workarounds.

paco-sevilla avatar Dec 11 '25 11:12 paco-sevilla