WIP: [pr-performance][memory] play: refreshes known to copy nothing are left out as they are queued (DARNER_REFRESH_ADD_SIFT=1 by default) #476

Closed
Yorivel wants to merge 2 commits from Yorivel/Darner:pr/refresh-add-sift into Main
Contributor

Refs #287

Contributor role (optional)

  • Fluxer ID: 1577734278060445696

What it changes

darner play now sets DARNER_REFRESH_ADD_SIFT=1 by default (one line in play.rs's defaults, and the switch's doc says so). The switch already exists: a refresh the write journal already says copies nothing is left out as it is put among a submission's pending refreshes (Batch::add), instead of being carried to the flush and looked at there among thousands. Its doc in host.rs gives why that is the same answer as at the flush (light refreshes on, the submission's one asking standing). It stays off where its own conditions do not hold (watch::light() off or shadow::new_batch()), and DARNER_REFRESH_ADD_SIFT=0 in the settings turns it off.

How it was found: the submitting thread was the frame's limit in the world. The title's threads waited 18.3 ms a frame at presents for it, and it spent 6.6 ms a frame in refreshes, about 10,000 a frame, roughly 90 % of them known to copy nothing.

How it was tested

  • Tested revision: a local PGO build of main f3840d7 with #310, #274, #283 and #341 merged. Both runs use that same exe; B only adds DARNER_REFRESH_ADD_SIFT=1 to the settings. The gates are on this branch (190f957, on main d91d8e4).

  • Changes a default: yes, DARNER_REFRESH_ADD_SIFT from off to on in darner play.

  • A/B result: RTX 4090, i9-14900K, Series X profile, 1440p, DLSS Quality, DLSS frame generation 2x, hardware RT. The same save and route; the first 5 minutes after the world was first drawn in each run:

    A (switch off) B (switch on)
    frames 7,578 8,865
    fps (frame-rate lines, mean) 25.1 29.3
    median frame 39.0 ms 33.3 ms
    frames over 50 ms 4.05 % 1.67 %
    frames over 100 ms 0.16 % 0.06 %
    submitting thread's work per frame 36.4 ms 21.1 ms
    the title's threads waiting at presents per frame 18.3 ms 2.5 ms
    refreshes per frame (time) 10,071 (6.6 ms) 8,947 (4.0 ms)

    B's median frame is 30 fps exactly, so the frame rate may be held there now. The saving on the submitting thread (15 ms) is larger than the refreshes' own time (2.6 ms), so most of it comes from what a pending refresh costs later, not from the drop itself.

  • Gates run on 190f957: the asset policy (564 files ok) and gates 1 and 2 (both clippy runs) pass. Gate 3 with --no-fail-fast: every crate passes except darner-shader's emit::waterfall_tests::sampled_marks_restore_early_depth_only_when_safe_in_pixel_shaders (DXIL validation: "Not all elements of output SV_Depth were written"). It fails on d91d8e4 without this change too, and #227 fixes it. Two earlier full runs each had one different darner-gpu test fail (host::menu::tests::a_change_is_saved_at_once_however_the_game_was_started, then gpu_owned::tests::concurrent_faults_on_same_block_serialize_single_readback); both pass alone, and darner-gpu's library tests passed in full on the third run (1,793 passed, 81 ignored). This change touches only a doc comment in darner-gpu.

  • Gameplay: the tester saw nothing wrong in B. Textures streaming in late when driving fast happens on every build and was the same.

  • Hardware dependence: the cost is on the CPU's submitting thread; any PC where that thread is the limit should gain. Other PCs untested.

  • Coverage gaps: one run each, 5 minutes in the world; both with #310's leave list, #274 and #341.

Checklist

  • I ran this change in the game, or say below why it can't be (docs, tests only).
  • 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 the open pull requests for the same issue and for the files this touches.
  • Related PRs: #459, #456, #451, #447, #435, #431 and #429 change play.rs (other defaults and settings; none touches the refresh switches). No open or closed PR or issue mentions DARNER_REFRESH_ADD_SIFT.
  • Replaces or overlaps: none found

🤖 Generated with Claude Code

Refs #287 ## Contributor role (optional) - Fluxer ID: 1577734278060445696 ## What it changes `darner play` now sets `DARNER_REFRESH_ADD_SIFT=1` by default (one line in `play.rs`'s defaults, and the switch's doc says so). The switch already exists: a refresh the write journal already says copies nothing is left out as it is put among a submission's pending refreshes (`Batch::add`), instead of being carried to the flush and looked at there among thousands. Its doc in `host.rs` gives why that is the same answer as at the flush (light refreshes on, the submission's one asking standing). It stays off where its own conditions do not hold (`watch::light()` off or `shadow::new_batch()`), and `DARNER_REFRESH_ADD_SIFT=0` in the settings turns it off. How it was found: the submitting thread was the frame's limit in the world. The title's threads waited 18.3 ms a frame at presents for it, and it spent 6.6 ms a frame in refreshes, about 10,000 a frame, roughly 90 % of them known to copy nothing. ## How it was tested - Tested revision: a local PGO build of `main` `f3840d7` with #310, #274, #283 and #341 merged. Both runs use that same exe; B only adds `DARNER_REFRESH_ADD_SIFT=1` to the settings. The gates are on this branch (`190f957`, on `main` `d91d8e4`). - Changes a default: **yes**, `DARNER_REFRESH_ADD_SIFT` from off to on in `darner play`. - A/B result: RTX 4090, i9-14900K, Series X profile, 1440p, DLSS Quality, DLSS frame generation 2x, hardware RT. The same save and route; the first 5 minutes after the world was first drawn in each run: | | A (switch off) | B (switch on) | |---|---:|---:| | frames | 7,578 | 8,865 | | fps (frame-rate lines, mean) | 25.1 | 29.3 | | median frame | 39.0 ms | 33.3 ms | | frames over 50 ms | 4.05 % | 1.67 % | | frames over 100 ms | 0.16 % | 0.06 % | | submitting thread's work per frame | 36.4 ms | 21.1 ms | | the title's threads waiting at presents per frame | 18.3 ms | 2.5 ms | | refreshes per frame (time) | 10,071 (6.6 ms) | 8,947 (4.0 ms) | B's median frame is 30 fps exactly, so the frame rate may be held there now. The saving on the submitting thread (15 ms) is larger than the refreshes' own time (2.6 ms), so most of it comes from what a pending refresh costs later, not from the drop itself. - Gates run on `190f957`: the asset policy (564 files ok) and gates 1 and 2 (both clippy runs) pass. Gate 3 with `--no-fail-fast`: every crate passes except `darner-shader`'s `emit::waterfall_tests::sampled_marks_restore_early_depth_only_when_safe_in_pixel_shaders` (DXIL validation: "Not all elements of output SV_Depth were written"). It fails on `d91d8e4` without this change too, and #227 fixes it. Two earlier full runs each had one different `darner-gpu` test fail (`host::menu::tests::a_change_is_saved_at_once_however_the_game_was_started`, then `gpu_owned::tests::concurrent_faults_on_same_block_serialize_single_readback`); both pass alone, and `darner-gpu`'s library tests passed in full on the third run (1,793 passed, 81 ignored). This change touches only a doc comment in `darner-gpu`. - Gameplay: the tester saw nothing wrong in B. Textures streaming in late when driving fast happens on every build and was the same. - Hardware dependence: the cost is on the CPU's submitting thread; any PC where that thread is the limit should gain. Other PCs untested. - Coverage gaps: one run each, 5 minutes in the world; both with #310's leave list, #274 and #341. ## Checklist - [x] I ran this change in the game, or say below why it can't be (docs, tests only). - [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 the open pull requests for the same issue and for the files this touches. - Related PRs: #459, #456, #451, #447, #435, #431 and #429 change `play.rs` (other defaults and settings; none touches the refresh switches). No open or closed PR or issue mentions `DARNER_REFRESH_ADD_SIFT`. - Replaces or overlaps: none found 🤖 Generated with [Claude Code](https://claude.com/claude-code)
First-time contributor

Tested on a different GPU: RTX 5080 16 GB, Ryzen 7 9800X3D, driver 32.0.16.2140, Windows 11. A/B of DARNER_REFRESH_ADD_SIFT (0 vs 1) on one build (main 47d21cd, release), so the two arms differ only in the switch; the PR changes the play default.

Method, following docs/ab-testing.md: 4 runs in the order A B B A (A = sift 0, B = sift 1), same save, standing still at one spot, ray tracing off, -NoMenu. Each run ended itself 120 s after the world first drew (DARNER_EXIT_AFTER_WORLD_S=120) and wrote per-frame DARNER_BENCH_CSV. Only the world rows were counted (draws >= 500); the draws/frame medians are within 4% within each condition. Done twice: frame generation off, then on (the description's numbers are with it on).

Average fps over each 120 s window:

condition A (sift 0) run 1 B (sift 1) run 2 B (sift 1) run 3 A (sift 0) run 4 mean A mean B within-arm spread
frame gen off 36.5 38.3 40.4 38.6 37.55 39.35 (+1.8) 2.1
frame gen on 29.0 28.8 28.7 29.5 29.25 28.75 (-0.5) 0.5

Both differences are inside the within-arm spread: no change we could measure on this machine, with 4 runs and a 120 s window per arm. The 1% low and prep_ms overlap too (frame gen off: p99 A 43.9/36.6 ms, B 37.3/35.7; frame gen on: A 38.8/39.2, B 41.2/39.0; prep_ms median 15.0-17.0 in all runs).

The switch was active in the B runs (the log's "refreshes known to copy nothing left out as they are put among the pending" line). The flush still counted about 87-90% of its refreshes as known to copy nothing in both arms, so most of what reaches the flush is not what the sift rules out.

Not tested: the RTX 4090 numbers in the description, moving scenes (standing only), other GPUs, and more runs - a ~5% effect needs more than 4 runs at this noise.

Drafted with AI assistance (OpenCode).

Tested on a different GPU: RTX 5080 16 GB, Ryzen 7 9800X3D, driver 32.0.16.2140, Windows 11. A/B of `DARNER_REFRESH_ADD_SIFT` (0 vs 1) on one build (main `47d21cd`, release), so the two arms differ only in the switch; the PR changes the play default. Method, following docs/ab-testing.md: 4 runs in the order A B B A (A = sift 0, B = sift 1), same save, standing still at one spot, ray tracing off, `-NoMenu`. Each run ended itself 120 s after the world first drew (`DARNER_EXIT_AFTER_WORLD_S=120`) and wrote per-frame `DARNER_BENCH_CSV`. Only the world rows were counted (draws >= 500); the draws/frame medians are within 4% within each condition. Done twice: frame generation off, then on (the description's numbers are with it on). Average fps over each 120 s window: | condition | A (sift 0) run 1 | B (sift 1) run 2 | B (sift 1) run 3 | A (sift 0) run 4 | mean A | mean B | within-arm spread | |---|---|---|---|---|---|---|---| | frame gen off | 36.5 | 38.3 | 40.4 | 38.6 | 37.55 | 39.35 (+1.8) | 2.1 | | frame gen on | 29.0 | 28.8 | 28.7 | 29.5 | 29.25 | 28.75 (-0.5) | 0.5 | Both differences are inside the within-arm spread: no change we could measure on this machine, with 4 runs and a 120 s window per arm. The 1% low and prep_ms overlap too (frame gen off: p99 A 43.9/36.6 ms, B 37.3/35.7; frame gen on: A 38.8/39.2, B 41.2/39.0; prep_ms median 15.0-17.0 in all runs). The switch was active in the B runs (the log's "refreshes known to copy nothing left out as they are put among the pending" line). The flush still counted about 87-90% of its refreshes as known to copy nothing in both arms, so most of what reaches the flush is not what the sift rules out. Not tested: the RTX 4090 numbers in the description, moving scenes (standing only), other GPUs, and more runs - a ~5% effect needs more than 4 runs at this noise. Drafted with AI assistance (OpenCode).
Contributor

Test report from a 24-thread CPU: no change here, because the switch finds almost nothing to leave out on this setup.

PC: i7-13700K (8P + 8E, 24 logical processors), RTX 4080 16 GB (driver 621.40), 64 GB, Windows 11 26300. Series X profile, 1440p with DLSS Quality, frame generation off, hardware ray tracing on, DARNER_D3D12_BACKGROUND=0, DARNER_ALIAS_SHARE=1.
Build: main 47d21cd + #334, #337, #457, #274, #397, #312, #304, #303. A = as is, B = the same exe with DARNER_REFRESH_ADD_SIFT=1 in the settings file (what this PR makes the default).
Method: the opening scene of one save, entered the same way every run (no input after the start screen); medians of per-second values from the host log in three 45-second windows from the moment the world appears; warm pipelines; runs in the order A, B (Reflex boost), B, A (Reflex off), A (Reflex boost).

A, Reflex boost (2 runs) B, Reflex boost A, Reflex off B, Reflex off
frame time, ms 29.0 / 29.6 / 29.9 and 29.1 / 30.1 / 30.0 29.5 / 29.8 / 29.8 24.9 / 24.7 / 24.6 25.1 / 24.8 / 24.8
submitting thread, ms a frame 21.1 / 20.6 / 20.8 and 21.4 / 21.0 / 20.7 21.6 / 21.4 / 20.9 19.8 / 19.5 / 19.4 20.1 / 19.8 / 19.8

Why nothing moves, from B's log: the askline counter says 12 refreshes a frame were looked at as they were put among the pending, 2 of them left out. At the flushes the same run still had 9,600 refreshes a frame, 8,412 of them known to copy nothing (A: 9,588 and 8,439). So on this build nearly all refreshes reach the pending list by a path that does not pass the sift; the 15 ms the PR measured may depend on what else was merged in its build (#310, #283, #341) or on the scene.

Not tested: the PR's own build, other scenes, frame generation on.

Test report from a 24-thread CPU: no change here, because the switch finds almost nothing to leave out on this setup. **PC:** i7-13700K (8P + 8E, 24 logical processors), RTX 4080 16 GB (driver 621.40), 64 GB, Windows 11 26300. Series X profile, 1440p with DLSS Quality, frame generation off, hardware ray tracing on, `DARNER_D3D12_BACKGROUND=0`, `DARNER_ALIAS_SHARE=1`. **Build:** main 47d21cd + #334, #337, #457, #274, #397, #312, #304, #303. A = as is, B = the same exe with `DARNER_REFRESH_ADD_SIFT=1` in the settings file (what this PR makes the default). **Method:** the opening scene of one save, entered the same way every run (no input after the start screen); medians of per-second values from the host log in three 45-second windows from the moment the world appears; warm pipelines; runs in the order A, B (Reflex boost), B, A (Reflex off), A (Reflex boost). | | A, Reflex boost (2 runs) | B, Reflex boost | A, Reflex off | B, Reflex off | |---|---|---|---|---| | frame time, ms | 29.0 / 29.6 / 29.9 and 29.1 / 30.1 / 30.0 | 29.5 / 29.8 / 29.8 | 24.9 / 24.7 / 24.6 | 25.1 / 24.8 / 24.8 | | submitting thread, ms a frame | 21.1 / 20.6 / 20.8 and 21.4 / 21.0 / 20.7 | 21.6 / 21.4 / 20.9 | 19.8 / 19.5 / 19.4 | 20.1 / 19.8 / 19.8 | Why nothing moves, from B's log: the askline counter says 12 refreshes a frame were looked at as they were put among the pending, 2 of them left out. At the flushes the same run still had 9,600 refreshes a frame, 8,412 of them known to copy nothing (A: 9,588 and 8,439). So on this build nearly all refreshes reach the pending list by a path that does not pass the sift; the 15 ms the PR measured may depend on what else was merged in its build (#310, #283, #341) or on the scene. Not tested: the PR's own build, other scenes, frame generation on.
Contributor

Test report from an 8-core PC, with the switch set by hand on main d91d8e4 (the PR only changes the default). Short version: no change I can measure while standing still. The first minutes in the world, where the description's numbers come from, I did not test.

System. Ryzen 7 5800X3D (8 cores, 16 threads), RTX 5080 16 GB (driver 621.47), 32 GB, Windows 11 26300, 2560x1440.

Build. One exe, main d91d8e4, cargo build --release --locked -p darner. B adds DARNER_REFRESH_ADD_SIFT=1; its line "refreshes known to copy nothing left out as they are put among the pending" is in both B logs.

Start and scene. scripts\play-nvidia.ps1 -NoMenu -Build release -Dlss balanced -Fps 1000 (Series X profile, DLSS balanced, no ray tracing, no frame generation), plus DARNER_DATA_DIR (a save copied fresh for every run), DARNER_SKIP_BINK=1, DARNER_BENCH_CSV. This launcher does not set the switch itself. Standing still in the open world on a daytime save, 30 s to settle and 180 s counted per run; the numbers are from the per-frame CSV over those 180 s. Order A B B A. Other programs used 0.11 to 0.13 of a logical processor during the runs.

The scene is CPU-limited here (about 13.3 of 16 logical processors busy), and its draw count cycles between about 6,700 and 14,600 a frame over a minute. So besides the plain numbers I give the frame time at equal draws: one-second means of frame time fitted against draws within each run, read at 10,700 draws.

run avg fps 1 % low fps frames over 50 ms draws a frame frame ms at 10,700 draws
A 1 14.89 (set aside, see below)
B 1 22.92 16.44 21.6 % 10,297 44.54
B 2 23.61 16.50 19.1 % 10,242 43.40
A 2 22.69 16.34 26.8 % 10,687 44.16

Four more A runs of the same exe and settings the same morning: 43.64 to 45.11 ms at 10,700 draws, 21.9 to 22.9 fps.

What I see.

  • 43.97 ms mean with the switch against 44.54 for the five usable main runs; the B runs are 1.1 ms apart. No difference I can measure. The submitting thread's time per frame in the preparing per frame lines is the same in both (about 30 to 37 ms, refreshes 6 to 7 ms of it).
  • Why, from both B logs: the askline lines say 10 refreshes a frame were looked at as they were put among the pending and 0 of them left out. The flushes still count about 10,100 refreshes a frame, about 9,100 of them known to copy nothing, the same as on A. So in this scene on this build the switch finds nothing to leave out, which is what MesoPlz reports above from another PC.
  • 0 errors, no device loss, the picture at the end looks the same.

The run set aside. The first A run was slow from its first second in the world to its last: 14.9 fps, refreshes 38.7 ms in 23 flushes a frame against about 7 in every other run, with the same count of refreshes and the same draws. Same exe and settings as A 2, and the PC was idle. I compared its log with A 2's and found no line that explains it. It was one run in 26 this morning (20 counted, 6 warm-ups); I mention it in case someone has seen the same.

Not measured. The first five minutes in the world and moving through it, which is what the description measured. Series X profile only, one PC.

The per-frame CSVs and logs are kept; say so if you want them.

Test report from an 8-core PC, with the switch set by hand on main `d91d8e4` (the PR only changes the default). Short version: no change I can measure while standing still. The first minutes in the world, where the description's numbers come from, I did not test. **System.** Ryzen 7 5800X3D (8 cores, 16 threads), RTX 5080 16 GB (driver 621.47), 32 GB, Windows 11 26300, 2560x1440. **Build.** One exe, main `d91d8e4`, `cargo build --release --locked -p darner`. B adds `DARNER_REFRESH_ADD_SIFT=1`; its line "refreshes known to copy nothing left out as they are put among the pending" is in both B logs. **Start and scene.** `scripts\play-nvidia.ps1 -NoMenu -Build release -Dlss balanced -Fps 1000` (Series X profile, DLSS balanced, no ray tracing, no frame generation), plus `DARNER_DATA_DIR` (a save copied fresh for every run), `DARNER_SKIP_BINK=1`, `DARNER_BENCH_CSV`. This launcher does not set the switch itself. Standing still in the open world on a daytime save, 30 s to settle and 180 s counted per run; the numbers are from the per-frame CSV over those 180 s. Order A B B A. Other programs used 0.11 to 0.13 of a logical processor during the runs. The scene is CPU-limited here (about 13.3 of 16 logical processors busy), and its draw count cycles between about 6,700 and 14,600 a frame over a minute. So besides the plain numbers I give the frame time at equal draws: one-second means of frame time fitted against draws within each run, read at 10,700 draws. | run | avg fps | 1 % low fps | frames over 50 ms | draws a frame | frame ms at 10,700 draws | |---|---:|---:|---:|---:|---:| | A 1 | 14.89 (set aside, see below) | | | | | | B 1 | 22.92 | 16.44 | 21.6 % | 10,297 | 44.54 | | B 2 | 23.61 | 16.50 | 19.1 % | 10,242 | 43.40 | | A 2 | 22.69 | 16.34 | 26.8 % | 10,687 | 44.16 | Four more A runs of the same exe and settings the same morning: 43.64 to 45.11 ms at 10,700 draws, 21.9 to 22.9 fps. **What I see.** - 43.97 ms mean with the switch against 44.54 for the five usable main runs; the B runs are 1.1 ms apart. No difference I can measure. The submitting thread's time per frame in the `preparing per frame` lines is the same in both (about 30 to 37 ms, refreshes 6 to 7 ms of it). - Why, from both B logs: the `askline` lines say 10 refreshes a frame were looked at as they were put among the pending and 0 of them left out. The flushes still count about 10,100 refreshes a frame, about 9,100 of them known to copy nothing, the same as on A. So in this scene on this build the switch finds nothing to leave out, which is what MesoPlz reports above from another PC. - 0 errors, no device loss, the picture at the end looks the same. **The run set aside.** The first A run was slow from its first second in the world to its last: 14.9 fps, `refreshes 38.7 ms in 23 flushes` a frame against about 7 in every other run, with the same count of refreshes and the same draws. Same exe and settings as A 2, and the PC was idle. I compared its log with A 2's and found no line that explains it. It was one run in 26 this morning (20 counted, 6 warm-ups); I mention it in case someone has seen the same. **Not measured.** The first five minutes in the world and moving through it, which is what the description measured. Series X profile only, one PC. The per-frame CSVs and logs are kept; say so if you want them.
First-time contributor

Tested merged on c8258f9 across two 30,000+ frame Series X sessions (RTX 5070 Ti 16 GB, Core Ultra 7 265KF, 64 GB DDR5-6400) with DARNER_REFRESH_ADD_SIFT=1:

  • Latest run telemetry (5s window at frame 30k): Refreshes looked at as they were put among the pending (DARNER_REFRESH_ADD_SIFT on): 10–14, 2 of them left out, 0.00 ms looking. Zero visual glitches or missing refreshes; submission lock wait remained 0.2 ms and submitting thread prep 13.3 ms.
  • cargo xtask policy, clippy --all-targets -- -D warnings (default & --all-features), and unit tests all pass cleanly.
Tested merged on `c8258f9` across two 30,000+ frame Series X sessions (RTX 5070 Ti 16 GB, Core Ultra 7 265KF, 64 GB DDR5-6400) with `DARNER_REFRESH_ADD_SIFT=1`: - Latest run telemetry (5s window at frame 30k): `Refreshes looked at as they were put among the pending (DARNER_REFRESH_ADD_SIFT on): 10–14, 2 of them left out, 0.00 ms looking`. Zero visual glitches or missing refreshes; submission lock wait remained `0.2 ms` and submitting thread prep `13.3 ms`. - `cargo xtask policy`, `clippy --all-targets -- -D warnings` (default & `--all-features`), and unit tests all pass cleanly.
Author
Contributor

Thank you @m3m3dub5, @MesoPlz, @iridiumlotus and @MasterWolf, these are better tests than mine.

You are right, and the description claims more than my test can carry. Where my A/B differs from yours:

  • One run per arm, not ABBA. The +17 % is one A run against one B run.
  • Another tree: a PGO build of f3840d7 with #310's leave list, #274, #283 and #341, and my own settings file, not main with darner play's defaults.
  • Moving: the first 5 minutes after the world was drawn, driving one route, not standing still.
  • That build had no askline line, so I cannot show how many refreshes the switch left out in my B run. Your logs show it: on main about 10-12 refreshes a frame pass it, 0-2 left out, while the flush still sees about 9,600, 8,400 of them known to copy nothing. Leaving out 2 a frame cannot save 15 ms. So my difference most likely came from run-to-run spread or from that other tree, not from this switch.

What I will do before asking for anything here: ABBA, 4 runs, on current main (c8258f9) with darner play's defaults, both standing still and on the same drive, with the askline and flush counts from each log. If the switch still shows nothing, I close this PR. The PR is marked WIP until then.

(Where the refresh time does go, from a census on the same PC: about 65 % of it is asking the write watch, and in texture memory most pages found written come from streaming's file reads through another view of the same physical pages, which no write at the texture's own address shows. That is where I am looking now; it will be its own PR if it holds.)

Thank you @m3m3dub5, @MesoPlz, @iridiumlotus and @MasterWolf, these are better tests than mine. You are right, and the description claims more than my test can carry. Where my A/B differs from yours: - **One run per arm**, not ABBA. The +17 % is one A run against one B run. - **Another tree**: a PGO build of `f3840d7` with #310's leave list, #274, #283 and #341, and my own settings file, not `main` with `darner play`'s defaults. - **Moving**: the first 5 minutes after the world was drawn, driving one route, not standing still. - That build had no `askline` line, so I cannot show how many refreshes the switch left out in my B run. Your logs show it: on `main` about 10-12 refreshes a frame pass it, 0-2 left out, while the flush still sees about 9,600, 8,400 of them known to copy nothing. Leaving out 2 a frame cannot save 15 ms. So my difference most likely came from run-to-run spread or from that other tree, not from this switch. What I will do before asking for anything here: ABBA, 4 runs, on current `main` (`c8258f9`) with `darner play`'s defaults, both standing still and on the same drive, with the `askline` and flush counts from each log. If the switch still shows nothing, I close this PR. The PR is marked WIP until then. (Where the refresh time does go, from a census on the same PC: about 65 % of it is asking the write watch, and in texture memory most pages found written come from streaming's file reads through another view of the same physical pages, which no write at the texture's own address shows. That is where I am looking now; it will be its own PR if it holds.)
Yorivel changed title from [pr-performance][memory] play: refreshes known to copy nothing are left out as they are queued (DARNER_REFRESH_ADD_SIFT=1 by default) to WIP: [pr-performance][memory] play: refreshes known to copy nothing are left out as they are queued (DARNER_REFRESH_ADD_SIFT=1 by default) 2026-12-05 09:47:55 +00:00
Author
Contributor

Same A/B as on #219 (A B C C B A, PGO, 300 s each, RTX 4090 / i9-14900K, uncapped): arm C = main c8258f9 + DARNER_REFRESH_ADD_SIFT=1: 27.3 / 27.5 fps (mean 27.4), median frame 36.2 / 34.9 ms, vs main 24.6 / 27.4 fps (mean 26.0). That's within main's own run-to-run spread, so no measurable effect on current main. Closing; happy to reopen if someone sees a difference on a slower CPU.

Same A/B as on #219 (A B C C B A, PGO, 300 s each, RTX 4090 / i9-14900K, uncapped): arm C = main c8258f9 + `DARNER_REFRESH_ADD_SIFT=1`: 27.3 / 27.5 fps (mean 27.4), median frame 36.2 / 34.9 ms, vs main 24.6 / 27.4 fps (mean 26.0). That's within main's own run-to-run spread, so no measurable effect on current main. Closing; happy to reopen if someone sees a difference on a slower CPU.
Yorivel closed this pull request 2026-12-05 11:55:26 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
5 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
TrustNo1/Darner!476
No description provided.