hle: read title packs through the host file cache (7x faster launch) #111
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/111"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from uiliannn/VItoriaBr. Originally posted by GaiuLulius on 2026-11-26T03:03:13Z.
Port of commit 79fd6c2 from upstream Marvisak/VIctory#2427 by @imjustprism.
🇧🇷 Português
Remove a flag FILE_FLAG_NO_BUFFERING em chamadas CreateFileW com acesso estrito de GENERIC_READ não-sobrepostas.
Isso permite que as leituras de pacotes de dados do jogo passem pelo cache de arquivos do sistema operacional (Windows file cache/RAM).
Aberturas sobrepostas e com escrita mantêm suas flags intactas. Inclui os 4 testes de regressão do commit original.
(Nota sobre os benchmarks: os números citados anteriormente foram aferidos pelo autor original na branch completa do PR #2427).
🇺🇸 English
Drops FILE_FLAG_NO_BUFFERING on non-overlapped CreateFileW calls with exact GENERIC_READ access.
This routes title package reads through the Windows host file cache, allowing subsequent launches to read asset chunks directly from memory instead of the disk. Overlapped and write opens preserve their flags. Includes the 4 regression tests from the original commit.
Co-authored-by: imjustprism [email protected]
Imported from uiliannn/VItoriaBr. Originally posted by upipibi on 2026-11-27T22:58:56Z.
Source and numbers, for credit (compared by reading, not run): this is the second commit of upstream Marvisak/VIctory#2427 by imjustprism,
79fd6c2"read title packs through the host file cache".dropped_flags, its doc comment and the four tests are the same code. The diff between the two commits is only context lines and the module-doc paragraph, which this PR leaves out. Under the GPL-3 the code may be used here. ACo-authored-by: imjustprism <[email protected]>line and a link to #2427 would credit them.The "~37 s → ~5.5 s" figures are imjustprism's, measured on the whole #2427 branch, which has three parts. Their table for builds with one part turned off shows a relaunch of 7.0 s without the pooled small buffers (
dc08afa). The cold launch is 27.3 s instead of 21 s without the DirectStorage synchronous-read part. This commit on its own was not measured there, so its share of the 7× is unknown.Upstream, #2427 is still open. Triage asked for it to be split into three PRs.
AI-assisted (Claude Code, Claude Opus 5.5 compared the two commits).
Imported from uiliannn/VItoriaBr. Originally posted by GaiuLulius on 2026-11-28T00:50:03Z.
Thanks for the correction and for pointing this out! You are absolutely right. The commit has been updated to include
Co-authored-by: imjustprism, a reference link to the upstream PR #2427, and the missing module documentation. The benchmark figures have also been clarified in the description, specifying that they represent the accuracy of the original author's full branch.Pull request closed