Skip to content

actions/cache is much slower on Windows #336

Closed

Description

@alcuadrado

Hi,

I'm not sure if this is a known issue, or I'm doing something wrong, but this action runs much much slower on windows runners for me. I tried finding issues related to this, but couldn't find any.

This is not terribly important, but it does force me to wait about four minutes longer for mi CI to run.

You can see this in action here:

Note that there are non-windows jobs, where actions/cache run much faster.

btw, thanks for releasing v2. It's a HUGE improvement.

Activity

  1. XhmikosR commented on May 31, 2020

    @XhmikosR

    Yup, confirmed. It's super slow on Windows to the extent it beats the point of having cache :/

  2. aiqiaoy commented on Jun 3, 2020

    @aiqiaoy
    Contributor

    Windows is still using gzip which is slower than the zstd compression that's used in Linux and macOS runner.

  3. alcuadrado commented on Jun 3, 2020

    @alcuadrado
    Author

    Thanks for the answer, @aiqiaoy! Will this change in the future?

  4. galtonova commented on Jun 6, 2020

    @galtonova

    Windows cache is too slow to the point that installing my 700mb dependencies from scratch takes about 100 seconds while caching and then installing takes about 90 seconds, then there is the time to cache when my dependencies change... Because of this now I don't use caching at all. Hope you change the compression algorithm and make it faster.

  5. dhadka commented on Jun 6, 2020

    @dhadka
    Contributor

    @galtonova Yes, the compression algorithm is definitely something we will need to fix. I'm also working on another improvement to help reduce the download time - actions/toolkit#493. However, this requires a new tool to be installed on the Windows runners. Progress installing that tool can be tracked here - actions/runner-images#1008.

  6. added a commit that references this issue on Jul 15, 2020
  7. flybayer commented on Jul 15, 2020

    @flybayer

    Any update on this now that actions/runner-images#1008 is merged?

  8. dhadka commented on Jul 16, 2020

    @dhadka
    Contributor

    @flybayer We ended up using the Azure Storage SDK for NodeJS instead of Azcopy. This was primarily done so we have better control over versioning and will also work out-of-the-box for self-hosted runners. This change is merged in toolkit/cache (see actions/toolkit#497 and actions/toolkit#497) and has been published to NPM. The last step is updating the version used by the cache action (see #375) and updating the release tag.

  9. sceee commented on Jul 21, 2020

    @sceee

    Since #375 is now merged, is there anything we need to do to consume this improved cache action if we're using actions/cache@v2?
    Will there be a new release of actions/cache that includes this improvement?

  10. dhadka commented on Jul 21, 2020

    @dhadka
    Contributor

    actions/[email protected] is published. Sorry for the delay getting this out, I found a bug in the version after posting above and had to push out a fix.

    You can see performance comparison on a 2.5 GB cache file - https://github.com/dhadka/cache-canary/runs/895195362?check_suite_focus=true

    Windows is still slightly slower than Ubuntu and Mac at 97 seconds, but this should be a substantial improvement compared to the 4 minutes needed to download the 818 MB cache that started this issue.

  11. dhadka commented on Jul 21, 2020

    @dhadka
    Contributor

    And the @v2 tag is updated to the same commit as @v2.1.0

  12. dhadka commented on Jul 22, 2020

    @dhadka
    Contributor

    Closing issue. If you continue to see slowness, please post in #267 which is a catch-all for network slowness.

  13. added a commit that references this issue on Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions