[pr-performance][memory] Bound heap refresh waits by command list closure #397

Open
andrewpozdnakov7-jpg wants to merge 1 commit from andrewpozdnakov7-jpg/Darner:assist/193-bound-heap-order-wait into main
First-time contributor

Contributor role (optional)

  • Fluxer ID:

What it changes

Refs #193.

Thin-list heap ordering waits for every open refresh pass in an epoch when a submitted list skips its own refresh. That includes passes opened after this list was closed. Track the newest eligible refresh pass at command-list closure and wait only through that cutoff. Older relevant passes can still complete and queued refreshes are still claimed before submission. The epoch fallback remains for lists without a close mark.

How it was tested

  • Tested revision: 67fa709a on f3840d73.
  • The synthetic queue check covered both an older pass that must still be awaited and a later pass that should no longer block submission. The focused Cargo check, asset policy and diff check passed.
  • Changes an enabled path: the wait cutoff applies where thin heap ordering is already in use. Neither ordering switch changes its default.
  • Independent A/B/B/A on the same RTX 4060 8 GB, NVIDIA 621.40, Series S 1080p, DLSS Quality, FG 2x, RT and HDR off, half textures. Both ordering switches and the 50 ms upload wait were held fixed. The tester built both exact revisions with cargo build --locked --offline -j 2 --profile fast --features diagnostics -p darner and compared the same opening from 45 to 120 seconds after the world marker. Full tester report
Measurement Main A1 Patch B1 Patch B2 Main A2
Heap wait, ms/s 54.51 0.44 0.20 49.93
Rendered P99, ms 333.1 166.5 122.5 201.3
Rendered FPS 14.38 14.68 15.99 14.99
Heap wait calls 681 9 5 633
  • The FPS ranges overlap. Flicker was still observed. The data covers one RTX 4060 opening. The original RTX 5080 city route has yet to be checked with this commit.
  • No full workspace gates were run for this change.

Checklist

  • The exact commit ran in the game in the independent test linked above.
  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched open and closed PRs for the issue and wait cutoff and checked open PRs that touch the changed files.
  • Related PRs: #274 changes retirement queues and #368 changes host logging. They address separate paths. CodeFloe #302 introduced thin-list ordering as discussed in #193.
  • Replaces or overlaps: no existing GTAHub PR for this cutoff found.
## Contributor role (optional) - Fluxer ID: <!-- optional --> ## What it changes Refs #193. Thin-list heap ordering waits for every open refresh pass in an epoch when a submitted list skips its own refresh. That includes passes opened after this list was closed. Track the newest eligible refresh pass at command-list closure and wait only through that cutoff. Older relevant passes can still complete and queued refreshes are still claimed before submission. The epoch fallback remains for lists without a close mark. ## How it was tested - Tested revision: `67fa709a` on `f3840d73`. - The synthetic queue check covered both an older pass that must still be awaited and a later pass that should no longer block submission. The focused Cargo check, asset policy and diff check passed. - Changes an enabled path: the wait cutoff applies where thin heap ordering is already in use. Neither ordering switch changes its default. - Independent A/B/B/A on the same RTX 4060 8 GB, NVIDIA 621.40, Series S 1080p, DLSS Quality, FG 2x, RT and HDR off, half textures. Both ordering switches and the 50 ms upload wait were held fixed. The tester built both exact revisions with `cargo build --locked --offline -j 2 --profile fast --features diagnostics -p darner` and compared the same opening from 45 to 120 seconds after the world marker. [Full tester report](https://git.gtahub.st/TrustNo1/Darner/issues/193#issuecomment-871506) | Measurement | Main A1 | Patch B1 | Patch B2 | Main A2 | |---|---:|---:|---:|---:| | Heap wait, ms/s | 54.51 | 0.44 | 0.20 | 49.93 | | Rendered P99, ms | 333.1 | 166.5 | 122.5 | 201.3 | | Rendered FPS | 14.38 | 14.68 | 15.99 | 14.99 | | Heap wait calls | 681 | 9 | 5 | 633 | - The FPS ranges overlap. Flicker was still observed. The data covers one RTX 4060 opening. The original RTX 5080 city route has yet to be checked with this commit. - No full workspace gates were run for this change. ## Checklist - [x] The exact commit ran in the game in the independent test linked above. - [x] This PR contains one change based on main. - [x] The diff follows docs/asset-policy.md. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched open and closed PRs for the issue and wait cutoff and checked open PRs that touch the changed files. - Related PRs: #274 changes retirement queues and #368 changes host logging. They address separate paths. CodeFloe #302 introduced thin-list ordering as discussed in #193. - Replaces or overlaps: no existing GTAHub PR for this cutoff found.
When a translated list skipped a heap buffer pass, record the pass cutoff at list close. Keep waiting for passes that could have supplied the list and use the previous epoch wait for lists without a close mark. Continue claiming queued refreshes before submission.

Refs: #193
https://git.gtahub.st/andrewpozdnakov7-jpg
https://github.com/andrewpozdnakov7-jpg
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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 'assist/193-bound-heap-order-wait:andrewpozdnakov7-jpg-assist/193-bound-heap-order-wait'
git switch 'andrewpozdnakov7-jpg-assist/193-bound-heap-order-wait'

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 'andrewpozdnakov7-jpg-assist/193-bound-heap-order-wait'
git switch 'andrewpozdnakov7-jpg-assist/193-bound-heap-order-wait'
git rebase 'main'
git switch 'main'
git merge --ff-only 'andrewpozdnakov7-jpg-assist/193-bound-heap-order-wait'
git switch 'andrewpozdnakov7-jpg-assist/193-bound-heap-order-wait'
git rebase 'main'
git switch 'main'
git merge --no-ff 'andrewpozdnakov7-jpg-assist/193-bound-heap-order-wait'
git switch 'main'
git merge --squash 'andrewpozdnakov7-jpg-assist/193-bound-heap-order-wait'
git switch 'main'
git merge --ff-only 'andrewpozdnakov7-jpg-assist/193-bound-heap-order-wait'
git switch 'main'
git merge 'andrewpozdnakov7-jpg-assist/193-bound-heap-order-wait'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!397
No description provided.