Skip to content

Seed new prefixes from a per-runner template instead of a full wineboot - #15

Closed
natbro wants to merge 1 commit into
NotProtonNot:devfrom
natbro:apfs-clone-prefix
Closed

natbro wants to merge 1 commit into
NotProtonNot:devfrom
natbro:apfs-clone-prefix

Conversation

@natbro

@natbro natbro commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

A fresh prefix is close to a gigabyte of files that wineboot copies out of the runner, and every game gets its own. Build one template ($STEAM_COMPAT_DATA_PATH)/notproton-template) per runner per library and seed each game from it with "cp -c", which clones on APFS so the files share blocks. Measured across two games: 2834 MB logical, 942 MB actually consumed. It also skips the work wineboot would redo, so launches after the first are noticeably faster.

The template sits in the library's compatdata, so it is always on the volume it seeds; a same_volume check falls back to a plain copy otherwise. It is built through lay_out_proton_profile and then wineboot, the same order and the same steps a game's prefix takes, because a bare wineboot leaves a real users/crossover directory that lay_out_proton_profile then refuses to convert, which would cost every seeded prefix the steamuser layout. That needed lay_out_proton_profile to accept the prefix to lay out. Depending on how Steam does integrity checks or wants this to work, it might make sense to store this in ($STEAM_COMPAT_DATA_PATH")/<NotProton-appid>/notproton-template instead.

The key includes the unix arch, since one runner directory now serves both flavors and they populate a prefix from different PE sets.

A fresh prefix is close to a gigabyte of files that wineboot copies out of the
runner, and every game gets its own. Build one template per runner per library
and seed each game from it with "cp -c", which clones on APFS so the files share
blocks. Measured across two games: 2834 MB logical, 942 MB actually consumed.
It also skips the work wineboot would redo, so launches after the first are
noticeably faster.

The template sits in the library's compatdata, so it is always on the volume it
seeds; a same_volume check falls back to a plain copy otherwise. It is built
through lay_out_proton_profile and then wineboot, the same order and the same
steps a game's prefix takes, because a bare wineboot leaves a real
users/crossover directory that lay_out_proton_profile then refuses to convert,
which would cost every seeded prefix the steamuser layout. That needed
lay_out_proton_profile to accept the prefix to lay out.

The key includes the unix arch, since one runner directory now serves both
flavors and they populate a prefix from different PE sets.
@natbro

natbro commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

some not clean overlap with #8, apologies I hadn't seen it, but I think all are relevant.

@NotProtonNot

Copy link
Copy Markdown
Owner

Will give this a review today. Very interesting way to do things. I was exploring this approach earlier in development, but it got cut for time. I think it's worth looking into.

@natbro

natbro commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

I'm just updated to HEAD of dev and this needed some modifications. I'm just finishing testing it and will update if you want to hold off a moment :)

@natbro

natbro commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

updating this with dev changes looked messy, so I'm closing and replacing with a cleaner-to-read #19).

@natbro natbro closed this Oct 2, 2026
@Ghostkwebb

Copy link
Copy Markdown
Contributor

omg @natbro big fan!

@Ghostkwebb

Copy link
Copy Markdown
Contributor

Please teach me how to develop Shadps4 to run better on mac 😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants