Preload: fewer compiler jobs under Wine/Proton #165

Open
TheStonedGamer wants to merge 1 commit from TheStonedGamer/Darner:preload-wine-jobs into main
First-time contributor

vkd3d-proton's shader cache write fails ('Failed to open stream archive
write file exclusively') when several compiler processes run at once.
Darner.exe now defaults to 2 concurrent jobs under Wine/Proton instead of
cores * 2 / 3, and the launcher stops overriding DARNER_PRELOAD_JOBS so the
binary's own detection applies.

Contributor role (optional)

  • Fluxer ID:

What it changes

How it was tested

  • Tested revision:
  • Commands and results:
  • Gameplay, when relevant: GPU, Series X or S profile, resolution, DLSS, frame generation, ray tracing.
  • Before and after, when relevant: compare the same scene, settings and hardware.
  • Shader wave sizes tested, when relevant: 32 and/or 64 lanes.
  • Coverage gaps:

Checklist

  • 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:
vkd3d-proton's shader cache write fails ('Failed to open stream archive write file exclusively') when several compiler processes run at once. Darner.exe now defaults to 2 concurrent jobs under Wine/Proton instead of cores * 2 / 3, and the launcher stops overriding DARNER_PRELOAD_JOBS so the binary's own detection applies. <!-- Thanks for the pull request. Please label it (pr-fix, pr-feature, pr-performance, pr-diagnostics, pr-refactor, pr-docs or pr-tests, plus the area labels), or put the label in the title, like [pr-fix]. --> <!-- Use Fixes #N for a complete fix or Refs #N for a partial change. --> ## Contributor role (optional) - Fluxer ID: <!-- Type !myid in the Darner Fluxer server and paste the number here. When this is merged, you get the Contributor role there. --> ## What it changes <!-- What was wrong, and what this does about it. --> ## How it was tested - Tested revision: - Commands and results: - Gameplay, when relevant: GPU, Series X or S profile, resolution, DLSS, frame generation, ray tracing. - Before and after, when relevant: compare the same scene, settings and hardware. - Shader wave sizes tested, when relevant: 32 and/or 64 lanes. - Coverage gaps: ## Checklist - [ ] 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 <!-- Replace the indented item above with one item per prerequisite using "- Depends on #N (reason)". Keep this PR in draft while any prerequisite is unmerged. Add the same PRs in CodeFloe's Dependencies panel if you can edit it. --> <!-- Address review feedback in this PR. Open a new PR for follow-up work. --> ## Checked for overlap - [ ] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: <!-- List #N or write "none found". -->
vkd3d-proton's shader cache write fails ('Failed to open stream archive
write file exclusively') when several compiler processes run at once.
Darner.exe now defaults to 2 concurrent jobs under Wine/Proton instead of
cores * 2 / 3, and the launcher stops overriding DARNER_PRELOAD_JOBS so the
binary's own detection applies.
Owner

Read through it. On Windows nothing changes: DARNER_PRELOAD_JOBS=0 (the launcher and F1 default) is filtered to None in darner preload, so the new default only applies when the Wine variables are set.

Before merging:

  • Please add a before/after from a Linux run: the preload's "Failed to open stream archive write file exclusively" lines and its time, with the old default and with 2 jobs, same cache state. Include the distro, Proton/vkd3d-proton version and CPU.
  • translate::precompile repeats the Wine check inline; please call warm::running_under_wine() there instead so the two can't drift.
  • Please fill in the template's testing section.
Read through it. On Windows nothing changes: DARNER_PRELOAD_JOBS=0 (the launcher and F1 default) is filtered to None in `darner preload`, so the new default only applies when the Wine variables are set. Before merging: - Please add a before/after from a Linux run: the preload's "Failed to open stream archive write file exclusively" lines and its time, with the old default and with 2 jobs, same cache state. Include the distro, Proton/vkd3d-proton version and CPU. - `translate::precompile` repeats the Wine check inline; please call `warm::running_under_wine()` there instead so the two can't drift. - Please fill in the template's testing section.
Contributor

The preload path still filters zero. Direct darner warm --jobs 0 passes Some(0) through to warm::run. At 3223df4 the minimum of one is inside the default closure, so an explicit zero reaches the worker loop. main still clamps the explicit value to one. I tested the extracted job selectors and worker range with one pending chunk on Rust 1.98.1: base started one worker and the candidate started zero. The Windows default, Wine default, and explicit positive count checks also passed. Keeping .max(1) after unwrap_or_else preserves the old direct-warm behaviour. This was an isolated check without a title run or Proton measurement. CLI dispatch · Candidate selector · Worker loop

The `preload` path still filters zero. Direct `darner warm --jobs 0` passes `Some(0)` through to `warm::run`. At `3223df4` the minimum of one is inside the default closure, so an explicit zero reaches the worker loop. `main` still clamps the explicit value to one. I tested the extracted job selectors and worker range with one pending chunk on Rust 1.98.1: base started one worker and the candidate started zero. The Windows default, Wine default, and explicit positive count checks also passed. Keeping `.max(1)` after `unwrap_or_else` preserves the old direct-`warm` behaviour. This was an isolated check without a title run or Proton measurement. [CLI dispatch](https://git.gtahub.st/TrustNo1/Darner/src/commit/57dea7f2367c4e902b8ef507f90536564b670b04/apps/darner/src/main.rs#L774-L780) · [Candidate selector](https://git.gtahub.st/TheStonedGamer/Darner/src/commit/3223df4054828bedb6886546d75ea1a7116c79c5/apps/darner/src/warm.rs#L241-L250) · [Worker loop](https://git.gtahub.st/TheStonedGamer/Darner/src/commit/3223df4054828bedb6886546d75ea1a7116c79c5/apps/darner/src/warm.rs#L278-L285)
TheStonedGamer force-pushed preload-wine-jobs from 3223df4054 to 205add9ea8 2026-12-04 03:24:09 +00:00 Compare
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 'preload-wine-jobs:TheStonedGamer-preload-wine-jobs'
git switch 'TheStonedGamer-preload-wine-jobs'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'TheStonedGamer-preload-wine-jobs'
git switch 'TheStonedGamer-preload-wine-jobs'
git rebase 'main'
git switch 'main'
git merge --ff-only 'TheStonedGamer-preload-wine-jobs'
git switch 'TheStonedGamer-preload-wine-jobs'
git rebase 'main'
git switch 'main'
git merge --no-ff 'TheStonedGamer-preload-wine-jobs'
git switch 'main'
git merge --squash 'TheStonedGamer-preload-wine-jobs'
git switch 'main'
git merge --ff-only 'TheStonedGamer-preload-wine-jobs'
git switch 'main'
git merge 'TheStonedGamer-preload-wine-jobs'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
3 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!165
No description provided.