Repository navigation
Conversation
mstan
left a comment
There was a problem hiding this comment.
Reviewed preparation-local thread-local/nested reader reuse, changed-mount/open-failure handling, fresh effective-sector reads and integrity boundaries. The actual resident/runtime/read-session suites pass in the combined Release gate. Retained author warm-local/NAS measurements are distinguished from unchanged cold latency.
Pushed 15e0f20 with the exact b66b37b lease to clean the generated test fixture after all reader handles close. The strengthened existing test passes on Windows with successful removal. This changes only the test; production code is identical to the qualified combined bb0d6de build. Final integration branch review/issues248-prs703-20261026 at 24d80d7 includes that cleanup. Ready from this review.
…ess-scoped-disc-reader Reuse the effective disc reader during resident pack preparation
Reuse the effective disc reader during resident pack preparation
Resident preparation verifies every catalog entry even when its pack is warm.
Each extent/read service previously reopened and reparsed the same CUE/BIN.
For EU1's 2,257 entries this is costly on a network share.
Add a thread-local RAII reader scope around psx_resident_prepare. The existing
three host file services reuse that reader only inside the preparation scope.
Nested scopes share it; mount changes invalidate it, failed opens are not cached,
and normal/exception exits release it. Outside the scope fresh-open behavior is
unchanged. Current effective sector overlays and ISO records are still read.
No disc identity, source hash, pack integrity or fail-closed fallback is skipped.
Prior controlled EU1 timings (single passes, not guaranteed): warm NAS preparation
21.514 s -> 0.208 s; warm local host preparation 1.464 s -> 0.224 s. Cold NAS
payload preparation remains about 44 s. The cold packs were byte-identical
(150,907,348 bytes); 2,257 source / 816 GAM checks and corruption/fallback tests
passed. The owner subsequently confirmed the EU1 optimization in ordinary use.
The transferred official-source scoped-reader regression passes: outside-scope
fresh reader, reuse/nesting, missing or changed mounts, exception cleanup.
The CMake target includes the official host-path header directory. The shared
path serves USA/EU1/EU2/Japan; practical performance acceptance is EU1, not all
regions or a full campaign. All four updated official-source Windows candidates built and passed original-disc verification, bounded relocated boot smokes and package privacy checks; no new all-region gameplay acceptance is claimed.
No deferred asset work or guest loader/timing change is introduced.
Independent of the audio and renderer PRs. No title or recomp-ui patch needed.