From eee98a3bad357bff89f510e685af5646cad98739 Mon Sep 17 00:00:00 2001 From: Theo Browne Date: Sun, 27 Sep 2026 19:21:31 -0700 Subject: [PATCH 1/2] perf(release): trim Windows packaging setup Windows arm64 is the slowest release job, and its setup is slow file work. Two changes, both measured on the release runners: - Check out with checkout.workers=0, which writes files on every core. Alternating both ways in one job, it was about 10s faster. - Drop the Windows package cache. Linking dominates a Windows install, so restoring the ~700 MB cache cost more than it saved: 183-233s for restore plus install on arm64 against 142-210s for a plain install across recent nightlies. The arm64 entries also used 4 GB of the 10 GB Actions cache. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/release-desktop.yml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml index c743b961560b..ae22d669a420 100644 --- a/.github/workflows/release-desktop.yml +++ b/.github/workflows/release-desktop.yml @@ -109,6 +109,9 @@ jobs: # This repository is public, so Git needs no credentials. checkout's # credential cleanup runs submodule foreach even with submodules disabled, # which fails on the orphaned gitlinks in our vendored .repos tree. + # checkout.workers=0 writes the files on every core. Alternating both ways + # in one job on the Windows runners, it wrote the files about 10s faster + # (about 40% on arm64). - name: Checkout shell: bash env: @@ -120,8 +123,14 @@ jobs: git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" git fetch --no-tags --depth=1 origin "$CHECKOUT_REF" git sparse-checkout set --no-cone '/*' '!/.repos/' - git checkout --detach FETCH_HEAD - + git -c checkout.workers=0 checkout --detach FETCH_HEAD + + # Windows installs straight from the registry. There, linking the packages + # takes the time, not downloading them, so a ~700 MB package cache did not + # pay for its own restore. Across recent nightlies, restore plus install + # took 183-233s on arm64 and 116-172s on x64, while a plain install took + # 142-210s and 84-160s. The arm64 entries also filled 4 GB of the + # repository's 10 GB Actions cache. - name: Setup Vite+ uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1 with: @@ -129,19 +138,6 @@ jobs: cache: ${{ inputs.platform != 'win' }} run-install: false - - name: Resolve Windows package cache path - if: inputs.platform == 'win' - id: package_cache_path - shell: pwsh - run: '"path=$(vp pm cache dir)" >> $env:GITHUB_OUTPUT' - - - name: Cache Windows packages - if: inputs.platform == 'win' - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6 - with: - path: ${{ steps.package_cache_path.outputs.path }} - key: windows-release-packages-v1-${{ inputs.arch }}-${{ hashFiles('pnpm-lock.yaml') }} - # pnpm checks the lockfile and policy before reusing this result. A missing # artifact leaves the cache empty, so installation runs the checks again. - name: Download dependency verification From fa5a7e8d4ce753028454870017a805d4b69024c6 Mon Sep 17 00:00:00 2001 From: Theo Browne Date: Wed, 30 Sep 2026 21:30:28 -0700 Subject: [PATCH 2/2] perf(release): skip the MSVC Spectre install when the monitor is cached Only the resource monitor build needs the Spectre-mitigated libraries. With a cached monitor, the desktop build's preflight already skips its MSVC check, and node-pty ships prebuilt Windows binaries, so nothing else compiles. This saves 30-60s per Windows job. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/release-desktop.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml index ae22d669a420..a6318633843c 100644 --- a/.github/workflows/release-desktop.yml +++ b/.github/workflows/release-desktop.yml @@ -213,8 +213,11 @@ jobs: name: cli-linux-${{ inputs.arch }} path: wsl-runtime + # Only the resource monitor build needs these libraries. With a cached + # monitor, the desktop build's preflight skips its MSVC check, and node-pty + # ships prebuilt Windows binaries, so the 30-60s install is skipped too. - name: Install Spectre-mitigated MSVC libs - if: inputs.platform == 'win' + if: inputs.platform == 'win' && steps.resource_monitor_cache.outputs.cache-hit != 'true' shell: pwsh run: | $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"