ValveSoftware / ValveSoftware/Proton
Games take a long time to launch when many fonts are installed
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 32.8k
- Forks
- 1.6k
- PR merge metrics
- PR metrics pending
Description
This is more of a note for other people running into the same problem that I had - while it may be possible for Steam Play to solve / work around this, the slowdown/bottleneck identified by this issue is kind of an edge case (one that can cause other issues, and can usually be addressed by other means), so it's not really a pressing concern. However, I did spend several months scratching my head about why my system seemed to be the only one with this problem, so I'm going to detail it here.
I'm on Arch Linux, and I had the ttf-google-fonts-git AUR package installed, which adds the thousands of fonts available on Google Fonts (in all variations) to the system. Wine processes every font on the system every time the wine server starts up. This meant that, on my system, every time I tried to launch a game with Proton, I had to wait for every font to be processed - this ended up taking several (10-20) minutes for each game to launch.
Possible solutions to this problem:
- Reduce the number of fonts installed on your system. Since this was already causing issues with other programs on my computer, this was the route I took: I went ahead and replaced
ttf-google-fonts-giton my system with justall-repository-fonts. Going forward, if I want to add a font from Google Fonts, I use Font Manager to do that on an as-needed basis. - Steam could force a custom fontconfig with only a subset of "safe" fonts (ie. those needed to run Steam itself) when launching games through Proton. (Most games don't need access to all the system's fonts, and this could be a good way to vendor in Windows-specific system fonts without needing them on the host.)
- Wine could maybe be refactored to not have this font enumeration at server startup, and/or Proton could share a Wine server across multiple games.
Again, reducing the number of fonts on the system returned me to acceptable (~1 minute) launch times.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the long Proton launch time with a system containing many fonts, then investigate the Wine font enumeration performed when the server starts. Compare the possible fontconfig restriction, deferred enumeration, and shared-server approaches; done means substantially reducing launch time without breaking games.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100