perf(release): a release's deltas are made at once, one per base #2606

Merged
HumanBean merged 1 commit from HumanBean/Longshot:perf/parallel-deltas into main 2026-11-26 07:01:45 +00:00
Owner

Summary

longshot-builder dev release deltas makes each base's delta one after the other: zstd -19 --long --patch-from, then undoes it to check it gives the full file back. In nightly-831 (run 54970) that took about 1.7 min per base, so 3.5 min for its two bases, between the dry runs and the uploads. That's about a quarter of a warm Linux job.

Each base now gets its own thread, so on the release runner's 2 cores the two deltas take about as long as one. Nothing else changes: the same zstd command, the same check, the manifest's deltas still in their from order, and the log lines in that order too.

Read builder/crates/longshot-builder/src/dev/release_deltas.rs, deltas.

Testing

Tested: through the job queue: cargo test -p longshot-builder for the deltas and bases (15 pass), cargo clippy -D warnings and cargo fmt clean. The next nightly's log is the real test: both "delta from" lines should come within about two minutes of the dry runs.

Still to test: the next nightly's deltas step.

Measurements

Expected: about 1.5–2 min saved per release job, from run 54970's two deltas at about 1.7 min each.

Risks

Peak memory during the deltas roughly doubles (two zstd --long processes at once). Revert to undo.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named). (this PR's CI runs it)
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

https://claude.ai/code/session_017vw8e1RP1VgcWpgA7Kq6ec

## Summary `longshot-builder dev release deltas` makes each base's delta one after the other: `zstd -19 --long --patch-from`, then undoes it to check it gives the full file back. In nightly-831 (run 54970) that took about 1.7 min per base, so 3.5 min for its two bases, between the dry runs and the uploads. That's about a quarter of a warm Linux job. Each base now gets its own thread, so on the release runner's 2 cores the two deltas take about as long as one. Nothing else changes: the same zstd command, the same check, the manifest's deltas still in their `from` order, and the log lines in that order too. Read `builder/crates/longshot-builder/src/dev/release_deltas.rs`, `deltas`. ## Testing **Tested:** through the job queue: `cargo test -p longshot-builder` for the deltas and bases (15 pass), `cargo clippy -D warnings` and `cargo fmt` clean. The next nightly's log is the real test: both "delta from" lines should come within about two minutes of the dry runs. **Still to test:** the next nightly's deltas step. ## Measurements Expected: about 1.5–2 min saved per release job, from run 54970's two deltas at about 1.7 min each. ## Risks Peak memory during the deltas roughly doubles (two zstd `--long` processes at once). Revert to undo. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (any failure that also fails on `main` is named). (this PR's CI runs it) - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017vw8e1RP1VgcWpgA7Kq6ec
perf(release): a release's deltas are made at once, one per base
Some checks failed
CI / What the change needs (pull_request) Successful in 10s
CI / Third-party parts and guide screenshots (pull_request) Successful in 15s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 2m10s
PR description / Title and description (pull_request_target) Failing after 8s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Successful in 2m49s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 3m19s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 3m18s
CI / Website build and checks (pull_request) Successful in 2m20s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 13m36s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Successful in 16m50s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Successful in 39m34s
ab27f824d3
dev release deltas made each base's delta (zstd -19 --long --patch-from, then undone and checked) one after the other:
about 1.7 minutes each, 3.5 for a nightly's two bases on the release runner's 2 cores. Each base now has its thread;
the manifest still lists them in their from's order, each still checked to give the full file back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e1RP1VgcWpgA7Kq6ec
Member

Possibly related, for context:

  • PR #2597 perf(release): reuse the last release's unchanged pack members, no dist debug info, stored uploads, Windows downloads kept — Recent release-job performance work; includes parallel zstd compression for pack members, but not delta generation.
Possibly related, for context: - PR #2597 perf(release): reuse the last release's unchanged pack members, no dist debug info, stored uploads, Windows downloads kept — Recent release-job performance work; includes parallel zstd compression for pack members, but not delta generation.
HumanBean changed title from WIP: perf(release): a release's deltas are made at once, one per base to perf(release): a release's deltas are made at once, one per base 2026-11-26 07:01:37 +00:00
HumanBean deleted branch perf/parallel-deltas 2026-11-26 07:01:45 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2606
No description provided.