perf: avoid redundant readback selection allocations #1229

Open
github-bot wants to merge 2 commits from github-bot/gh-1229 into main AGit
Owner

@⁠spk-c on GitHub · 2026-11-26 00:59 UTC · original
spk-c:submit/readback-selection → main · +51 −27 · 1 files · 2 commits · open

Summary

Stream flags directly into the selected-piece union, avoid temporary allocations, and reuse inflight ticket keys. Preserve forced-refetch counts, copy ranges, byte counts and synchronization. The synthetic parity regression covers 1,024 combinations.

Validation

All CI steps passed for this isolated change against the corrected test baseline in the fork: https://github.com/spk-c/victory-fork/actions/runs/45731809147.

This submission is a single commit rebased onto upstream a183ea2; exact-revision upstream CI is pending. Upstream's pre-existing CI failures are addressed separately in #1228. Draft pending baseline and upstream review. AI-assisted.

Refresh against upstream 52ac4ec

New head 6ca976192b1b33100cf4b9aaa6e39a57ed1ef469; the streamed selection versus two-pass selection regression passed. Clean isolated workspace Cargo Check and strict all-feature Clippy passed. Original commits are preserved. PR-only diff check passed. Full upstream CI approval and source-size policy fix #1357 remain pending.

**@⁠spk-c** on GitHub · 2026-11-26 00:59 UTC · [original](https://github.com/fxceless/victory-fork/pull/1229) `spk-c:submit/readback-selection` → `main` · +51 −27 · 1 files · 2 commits · open ## Summary Stream flags directly into the selected-piece union, avoid temporary allocations, and reuse inflight ticket keys. Preserve forced-refetch counts, copy ranges, byte counts and synchronization. The synthetic parity regression covers 1,024 combinations. ## Validation All CI steps passed for this isolated change against the corrected test baseline in the fork: https://github.com/spk-c/victory-fork/actions/runs/45731809147. This submission is a single commit rebased onto upstream a183ea2; exact-revision upstream CI is pending. Upstream's pre-existing CI failures are addressed separately in #1228. Draft pending baseline and upstream review. AI-assisted. ## Refresh against upstream 52ac4ec New head `6ca976192b1b33100cf4b9aaa6e39a57ed1ef469`; the streamed selection versus two-pass selection regression passed. Clean isolated workspace Cargo Check and strict all-feature Clippy passed. Original commits are preserved. PR-only diff check passed. Full upstream CI approval and source-size policy fix #1357 remain pending.
Isolated contribution based on a183ea2. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:59:58 +00:00
AI-assisted: keep original tested commit in history; local all-feature check, strict Clippy and focused synthetic tests passed. Upstream asset-policy baseline remains open (#1357).
Author
Owner

@⁠UncommonDLL on GitHub · 2026-11-26 19:44 UTC · original

Alpha validation of tested head f8a21a3d4d415c52f0eb06e849a3475d2ccab128 against direct parent a183ea275e48e047eeb18790b09cac19d6e4b8c2. These measurements cover CPU selection and range construction on the Ryzen 7 7800X3D and apply to those tested commits.

All 24 correctness checks passed. On the overlapping in-flight ticket workload, 2,304 input occurrences selected 1,365 pieces. Across 32 paired rounds, the median CPU saving was 72.944 µs per batch. Allocated bytes fell from 656,692 to 455,960.

Codex-assisted validation and write-up.

**@⁠UncommonDLL** on GitHub · 2026-11-26 19:44 UTC · [original](https://github.com/fxceless/victory-fork/pull/1229#issuecomment-7201915833) Alpha validation of tested head `f8a21a3d4d415c52f0eb06e849a3475d2ccab128` against direct parent `a183ea275e48e047eeb18790b09cac19d6e4b8c2`. These measurements cover CPU selection and range construction on the Ryzen 7 7800X3D and apply to those tested commits. All 24 correctness checks passed. On the overlapping in-flight ticket workload, 2,304 input occurrences selected 1,365 pieces. Across 32 paired rounds, the median CPU saving was **72.944 µs per batch**. Allocated bytes fell from **656,692 to 455,960**. Codex-assisted validation and write-up.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1229/head:github-bot/gh-1229'
git switch 'github-bot/gh-1229'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1229'
git switch 'github-bot/gh-1229'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1229'
git switch 'github-bot/gh-1229'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1229'
git switch 'main'
git merge --squash 'github-bot/gh-1229'
git switch 'main'
git merge --ff-only 'github-bot/gh-1229'
git switch 'main'
git merge 'github-bot/gh-1229'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.