draw: look at textures that keep changing unnoticed every frame (VICTORY_HOT_RECHECK, off) #303

Open
github-bot wants to merge 1 commit from github-bot/gh-303 into main AGit
Owner

@⁠nullexxx on GitHub · 2026-11-27 14:49 UTC · original
nullexxx:perf/hot-texture-recheck → main · +67 −0 · 1 files · 1 commits · draft

Draft: measured, but no visible effect identified yet. This is offered for others to test.

What

VICTORY_HOT_RECHECK=1 (off by default): once a texture picked by index has been found changed with nothing to tell of it twice, its slot is looked at every frame from then on, instead of the look spreading out again (4, 12, 40, … frames) after each change. Each look reads 48 KiB. A summary line logs, every 250 changes found, the unchanged looks, the changes, and the looks and changes at hot slots. In a diagnostics build, VICTORY_AB can flip the switch.

Why

On an RTX 5080 (GE-Proton11-14-viewtree, Series S profile, standing still in the opening area), the a texture picked by index changed after its upload with nothing to tell of it warning reached its 200-line cap within a few minutes in every session:

  • All 200 logged cases had blocks_shown_elsewhere > 0: textures the title repaints through another view of their pages.
  • Only 32 distinct slots. Three of them account for 117 of the 200, and 163 are the same size (557,056 bytes).
  • They were found 13, 41, 45 or 56 frames after their upload, so they were shown stale until then, over and over.

Measured

Two runs of about 3 minutes at the same spot, same build otherwise. The second ran at night, which raised the GPU time; that, not this switch, is behind the lower frame rate.

off VICTORY_HOT_RECHECK=1
frames after upload at which the change was found (most common, of the 200 logged) 1, 13, 41, 45, 12, 56 2, 1, 3, 12, 56
slots looked at every frame none 30
CPU time on textures, median per frame 0.9 ms 0.8 ms
CPU preparing, median per frame 33.3 ms 30.7 ms
GPU per frame, median 2.1 ms (day) 22.4 ms (night)

Open question

Watching the opening area, I could not see a difference with it on. These 30 textures are apparently not the foliage, which still shimmers either way. If someone recognises which surfaces such slots are (544 KiB, repainted through an aliased view all session), this would show where to look. Otherwise it is a cheap correctness improvement with no visible payoff found so far.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SEGb52ApL88uPMf5GhSz8K

**@⁠nullexxx** on GitHub · 2026-11-27 14:49 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/303) `nullexxx:perf/hot-texture-recheck` → `main` · +67 −0 · 1 files · 1 commits · draft **Draft: measured, but no visible effect identified yet.** This is offered for others to test. ### What `VICTORY_HOT_RECHECK=1` (off by default): once a texture picked by index has been found changed with nothing to tell of it **twice**, its slot is looked at every frame from then on, instead of the look spreading out again (4, 12, 40, … frames) after each change. Each look reads 48 KiB. A summary line logs, every 250 changes found, the unchanged looks, the changes, and the looks and changes at hot slots. In a diagnostics build, `VICTORY_AB` can flip the switch. ### Why On an RTX 5080 (GE-Proton11-14-viewtree, Series S profile, standing still in the opening area), the `a texture picked by index changed after its upload with nothing to tell of it` warning reached its 200-line cap within a few minutes in every session: - All 200 logged cases had `blocks_shown_elsewhere` > 0: textures the title repaints through another view of their pages. - Only 32 distinct slots. Three of them account for 117 of the 200, and 163 are the same size (557,056 bytes). - They were found 13, 41, 45 or 56 frames after their upload, so they were shown stale until then, over and over. ### Measured Two runs of about 3 minutes at the same spot, same build otherwise. The second ran at night, which raised the GPU time; that, not this switch, is behind the lower frame rate. | | off | `VICTORY_HOT_RECHECK=1` | |---|---|---| | frames after upload at which the change was found (most common, of the 200 logged) | 1, **13, 41, 45**, 12, 56 | **2, 1, 3**, 12, 56 | | slots looked at every frame | none | 30 | | CPU time on textures, median per frame | 0.9 ms | 0.8 ms | | CPU preparing, median per frame | 33.3 ms | 30.7 ms | | GPU per frame, median | 2.1 ms (day) | 22.4 ms (night) | ### Open question Watching the opening area, I could not see a difference with it on. These 30 textures are apparently not the foliage, which still shimmers either way. If someone recognises which surfaces such slots are (544 KiB, repainted through an aliased view all session), this would show where to look. Otherwise it is a cheap correctness improvement with no visible payoff found so far. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01SEGb52ApL88uPMf5GhSz8K
A texture picked by index that the title repaints through another view of
its pages is only found changed at the next scheduled look (4, 12, 40, ...
frames), and shown stale until then, over and over. From its second change
found, a slot is looked at every frame (48 KiB read per look). In a
diagnostics build VICTORY_AB can flip it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SEGb52ApL88uPMf5GhSz8K
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 14:59:59 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 14:57 UTC · original

@⁠nullexxx The change detection moving from 13–45 frames to mostly 1–3 is worth following. At 30 hot slots, the checks read about 1.4 MiB each frame. Compare the same lighting and camera, and record how many slots remain hot after moving to a different area. That should show both the visual effect and the long-session cost.

**@⁠TaynanGT** on GitHub · 2026-11-27 14:57 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/303#issuecomment-7221435683) @⁠nullexxx The change detection moving from 13–45 frames to mostly 1–3 is worth following. At 30 hot slots, the checks read about 1.4 MiB each frame. Compare the same lighting and camera, and record how many slots remain hot after moving to a different area. That should show both the visual effect and the long-session cost.
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 origin '+refs/pull/303/head:github-bot/gh-303'
git switch 'github-bot/gh-303'

Merge

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