Skip to content

Conversation

@Firestar99
Copy link
Member

@Firestar99 Firestar99 commented Feb 10, 2026

Maybe it'll speed up our CI?
https://github.com/Swatinem/rust-cache

My investigation log

Adding caching

First run (with no cache present) is looking real bad:

  • windows test +1m 8s
  • windows difftest +6m 24s
  • no idea why the cache would take so long when there's nothing to download and nothing has been compiled???
  • all "install rust toolchain" are now 0s, so we probably have to move them before the cache action

First CI with restore

Comparing latest main to this PR:

  • overall time: 27m 39s -> 16m 8s
  • longest job "windows-difftest": 27m 29s -> 16m 0s
  • cache restore, measured from seconded empty commit in this PR, which may have been removed:
    • windows: 58s to 2m 3s
      • first run of windows difftest has an obscene "restore" of 6m 24s even though there's nothing to restore???
    • linux: ~30s
    • mac: 30s - 40s
  • cache creation, measured from first commit in this PR:
    • windows: 30s - 1m
    • linux: 8s - 15s
    • mac: 30s - 50s

Install toolchain before restore

  • rust-cache seems to install the toolchain for you via rustup if you don't do it yourself, toolchain install has 0s execution time
  • Action: move it before cache restore
  • Results: old rust-cache time is now split between rustup install and new rust-cache
  • Could caches contain rustup builds? Try purging caches

@nazar-pc
Copy link
Contributor

In my projects I usually disable caching on Windows. Their gzip or whatever compression they use is so spectacularly slow that it is faster to download/install things from scratch than decompressing/recompressing cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants