Skip to content

Conversation

@ibetitsmike
Copy link
Contributor

Problem

Windows builds were taking ~8 minutes, with setup-mux taking ~2.5 minutes.

Root Cause

The cache-hit output from actions/cache is false for partial restore-key matches. This caused:

  1. node_modules cache restored via restore-key → cache-hit='false'
  2. Bun install cache also restored (275MB) → 88s decompression on Windows tar/zstd
  3. bun install runs but is a no-op (node_modules exists)
  4. Post-job: both caches re-saved with new keys (~77s combined)

Timeline breakdown (from this run):

Step Duration
Restore node_modules 30s
Restore bun cache 88s ← wasted
bun install 0.5s
choco install make 12s
bun run build 53s
make dist-win 163s
Post: save caches 77s ← partially wasted

Solution

Check if node_modules/.bin actually exists after cache restore, instead of relying on cache-hit output. This is more reliable for determining if we need to install dependencies.

Expected improvement

~88-165 seconds saved on Windows builds when lockfile hash changes (partial cache hit scenario).

Generated with mux

The previous logic checked cache-hit output which is false for partial
restore-key matches. This caused Windows builds to unnecessarily:

1. Download and decompress the 275MB bun install cache (~88 seconds)
2. Run bun install (which was a no-op since node_modules existed)
3. Re-save both caches at job end (~77 seconds)

The fix checks if node_modules/.bin actually exists after cache restore,
which is more reliable than the cache-hit output for determining if we
need to install dependencies.

Expected time savings: ~88-165 seconds on Windows builds (was ~8m, should
be ~6m or less).

_Generated with mux_
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@ibetitsmike ibetitsmike added this pull request to the merge queue Dec 9, 2025
Merged via the queue into main with commit 2ad03c4 Dec 9, 2025
19 of 20 checks passed
@ibetitsmike ibetitsmike deleted the windows-build-mux-slow branch December 9, 2025 13:00
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.

1 participant