Game: stop scanning database states once the wanted hashes are named #3707

Open
andrewpozdnakov7-jpg wants to merge 1 commit from upstream-pr/3707 into main
andrewpozdnakov7-jpg commented 2026-11-28 10:04:07 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T10:04:07Z.


The database pass can stop reading depth, rasterizer or blend descriptions once all wanted hashes of that kind have names. It leaves the effect list early when all three sets are empty. The order in which names are assigned stays the same.

I compared the exact database passes on Windows in release mode with 25,000 generated effects. The tests matched the named state bytes, source labels and remaining wanted hashes in all three cases.

Case Main Patch
First effect names all states 7.372 ms 0.003 ms
One depth hash remains unresolved 6.476 ms 1.686 ms
All hashes remain unresolved 6.478 ms 6.536 ms

Each result is the median of 17 alternating pairs and covers the database pass. All 15 game tests, strict Clippy and the asset policy passed.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5539015012 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3707). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T10:04:07Z. --- The database pass can stop reading depth, rasterizer or blend descriptions once all wanted hashes of that kind have names. It leaves the effect list early when all three sets are empty. The order in which names are assigned stays the same. I compared the exact database passes on Windows in release mode with 25,000 generated effects. The tests matched the named state bytes, source labels and remaining wanted hashes in all three cases. | Case | Main | Patch | | --- | ---: | ---: | | First effect names all states | 7.372 ms | 0.003 ms | | One depth hash remains unresolved | 6.476 ms | 1.686 ms | | All hashes remain unresolved | 6.478 ms | 6.536 ms | Each result is the median of 17 alternating pairs and covers the database pass. All 15 game tests, strict Clippy and the asset policy passed. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit. AI-assisted with OpenAI Codex.
andrewpozdnakov7-jpg commented 2026-11-28 10:08:01 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T10:08:01Z.


Windows CI passed on 4a5402b, including both Clippy configurations and the workspace tests. The generated 25,000-effect comparison matched the state bytes, source labels and unresolved sets in all three cases. A single remaining depth hash took 6.476 to 1.686 ms in the isolated database stage. The all-unresolved control took 6.478 to 6.536 ms.

The next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7237692712 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3707#issuecomment-7237692712). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T10:08:01Z. --- [Windows CI](https://github.com/Marvisak/VIctory/actions/runs/46133393278/job/140943300556) passed on `4a5402b`, including both Clippy configurations and the workspace tests. The generated 25,000-effect comparison matched the state bytes, source labels and unresolved sets in all three cases. A single remaining depth hash took 6.476 to 1.686 ms in the isolated database stage. The all-unresolved control took 6.478 to 6.536 ms. The next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit. AI-assisted with OpenAI Codex.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3707:upstream-pr/3707'
git switch 'upstream-pr/3707'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3707'
git switch 'upstream-pr/3707'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3707'
git switch 'upstream-pr/3707'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3707'
git switch 'main'
git merge --squash 'upstream-pr/3707'
git switch 'main'
git merge --ff-only 'upstream-pr/3707'
git switch 'main'
git merge 'upstream-pr/3707'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!3707
No description provided.