startup: #2846's probe pre-check runs in every title run (always under the debugger) and drops the late load from ~16 to ~1 fps #3312

Closed
opened 2026-11-28 08:09:38 +00:00 by lukaslw-lab · 0 comments
lukaslw-lab commented 2026-11-28 08:09:38 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-28T08:09:38Z.


Since #2846, the main executable's late load (140–250 s into a scripted run) drops from about 16 fps to about 1 fps
on this host. The pre-check is gated on IsDebuggerPresent(), and run.ps1 always starts the title under
debug_launch.py, so every probe_readable and guarded copy asks VirtualQuery first. X2W_PROBE_PRECHECK=0
cannot turn it off: precheck_enabled() returns IsDebuggerPresent() || <X2W_PROBE_PRECHECK set and not 0>.

Windows 10 22H2 (19045), i7-4790K (4C/8T), 16 GB, RTX 3080 Ti, NVIDIA 32.0.16.1047. Release builds, warm shader cache
(revision 29), scripted input, X2W_D3D12_RING_RELEASE_AT_SUBMIT=1 X2W_D3D12_TABLE_ALIAS=1 X2W_D3D12_ROOT_SRV_AT_DRAW=1,
the same run.ps1 / debug_launch.py (from ca659396) in every run. Aggregates only; logs stay local.

Build Pre-check fps 140–190 s inflated blocks at ~190 s reads refused before a fault
9345c21f (parent of #2846) – 14.5 – –
fad97f47 (#2846) on (debugger) 1.2 123k 128
fd7ce57a (main) + the change in #3313, X2W_PROBE_PRECHECK=0 off 11.2 181k 0
  • Found with git bisect over ca659396..fd7ce57a (8 steps, verdict = fps 140–190 s; good 11–17, bad 1.0–3.6).
  • The pre-check avoided 128 first-chance faults in the whole run, so on this workload it costs far more than the
    debugger stops it saves.
  • The review of #2846 measured the cost and gated it to "debugger attached"; title runs are that case.
  • It also affects the saved-profile runs for the #870 3D checkpoint ("continuous scene motion") on hosts like this one.

Fix in #3313: an explicit X2W_PROBE_PRECHECK wins over the debugger check (0 off, anything else on); unset
keeps today's behaviour. Whether it should be off by default under the debugger is your call.

AI-assisted (Claude); I ran the runs and the bisect.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6661656741 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3312). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-28T08:09:38Z. --- Since #2846, the main executable's late load (140–250 s into a scripted run) drops from about 16 fps to about 1 fps on this host. The pre-check is gated on `IsDebuggerPresent()`, and `run.ps1` always starts the title under `debug_launch.py`, so every `probe_readable` and guarded copy asks `VirtualQuery` first. `X2W_PROBE_PRECHECK=0` cannot turn it off: `precheck_enabled()` returns `IsDebuggerPresent() || <X2W_PROBE_PRECHECK set and not 0>`. Windows 10 22H2 (19045), i7-4790K (4C/8T), 16 GB, RTX 3080 Ti, NVIDIA 32.0.16.1047. Release builds, warm shader cache (revision 29), scripted input, `X2W_D3D12_RING_RELEASE_AT_SUBMIT=1 X2W_D3D12_TABLE_ALIAS=1 X2W_D3D12_ROOT_SRV_AT_DRAW=1`, the same `run.ps1` / `debug_launch.py` (from `ca659396`) in every run. Aggregates only; logs stay local. | Build | Pre-check | fps 140–190 s | inflated blocks at ~190 s | reads refused before a fault | |---|---|---|---|---| | `9345c21f` (parent of #2846) | – | 14.5 | – | – | | `fad97f47` (#2846) | on (debugger) | 1.2 | 123k | 128 | | `fd7ce57a` (`main`) + the change in #3313, `X2W_PROBE_PRECHECK=0` | off | 11.2 | 181k | 0 | - Found with `git bisect` over `ca659396..fd7ce57a` (8 steps, verdict = fps 140–190 s; good 11–17, bad 1.0–3.6). - The pre-check avoided 128 first-chance faults in the whole run, so on this workload it costs far more than the debugger stops it saves. - The review of #2846 measured the cost and gated it to "debugger attached"; title runs are that case. - It also affects the saved-profile runs for the #870 3D checkpoint ("continuous scene motion") on hosts like this one. **Fix in #3313:** an explicit `X2W_PROBE_PRECHECK` wins over the debugger check (`0` off, anything else on); unset keeps today's behaviour. Whether it should be off by default under the debugger is your call. AI-assisted (Claude); I ran the runs and the bisect.
Sign in to join this conversation.
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
R0Y00/Xbox2Windows#3312
No description provided.