protonscr

Fractal Block World

protonopen appid 1540570Game compatibility - Unofficial
ValveSoftware/Proton#8254 · opened 2024-11-19 by TheRogueArchivist · updated 2025-01-28 · 9 comments · github · game page · search this game
TTheRogueArchivist 2024-11-19 github

Compatibility Report

  • Name of the game with compatibility issues: Fractal Block World
  • Steam AppID of the game: 1540570

System Information

I confirm:

  • [X] that I haven't found an existing compatibility report for this game.
  • [X] that I have checked whether there are updates for my system available.

Symptoms

When saving the game, it can take quite a while longer than on Windows. With Proton, it takes roughly a minute to save 2,000 chunks (which is how it measures progress in saving), which can be quite an issue in the later game when a normal save can require 5,000+ chunks. It also appears to save them in chunks in groups of even hundreds, instead of a smoother, continuous progression.

Reproduction

Requires fairly significant progression within the game to run into noticeable issues. If you play enough for there to be a sizeable difference since your previous save, and then save (whether through menu option or using a save block in game), you will notice the save screen pop up and take longer than it should in order to finish. Image of this screen is attached.

20241119053825_1

steam-1540570.log

Ssimifor 2024-11-20 github

@TheRogueArchivist Could you run the game with proton experimental and add this as launch parameter: PROTON_LOG=+file,+volume,+path %command%. Run the game until you get a slow save screen, compress the resulting log and upload it.

It would also be interesting to have some time estimates for windows, you mention that it saves faster but didn't mention by how much.

TTheRogueArchivist 2024-11-21 github

I'll see about getting timing from Windows, but it seemed to be better by an order of magnitude at least. Saving never was a noticeable issue whatsoever on it, though I'll check shortly to be more exact. Attached is the log file with the parameters requested. I did notice that the save screen itself didn't pop up this time, but my game was frozen while saving for several minutes when I saved so the bug was still triggered, just in a slightly different way. I had to compress this one and upload it separately, due to the log being roughly 4 GB.

The dev said this in relation to why performance on Linux is likely an issue:
There is not much we can do about it. Changes to a chunk are stored in a "chunk file". Since each chunk file is a separate file, this means there are lots of files that need to be written to. This must be the problem. Eventually we hope to use a database for saved games instead of thousands of files. Hopefully that will improve things, but it will be a while before we implement that.

Log: https://drive.google.com/file/d/1iY_g7V3quCJ1O3X2ioIBYg8ePSWwZ74r/view?usp=sharing

TTheRogueArchivist 2024-11-21 github

Confirmed that Windows is much faster, saving about 2,000 chunks takes only a few seconds. I also noticed overall performance is slightly better as well.

Ggofman 2024-11-21 github

The dev said this in relation to why performance on Linux is likely an issue: There is not much we can do about it. Changes to a chunk are stored in a "chunk file". Since each chunk file is a separate file, this means there are lots of files that need to be written to. This must be the problem. Eventually we hope to use a database for saved games instead of thousands of files. Hopefully that will improve things, but it will be a while before we implement that.

Log: https://drive.google.com/file/d/1iY_g7V3quCJ1O3X2ioIBYg8ePSWwZ74r/view?usp=sharing

But from the log, besides opening those files, the game does no less of calls like this:

165290.078:0124:0128:trace:file:FindFirstFileExW L"Z:\\run\\media\\nyxh\\mg\\SteamLibrary\\steamapps\\common\\Fractal Block World\\Data\\Save\\b;arb\\Chunks\\*" 0 01A2DE30 0 000
00000 0
165290.078:0124:0128:trace:path:PathFindFileNameW L"Z:\\run\\media\\nyxh\\mg\\SteamLibrary\\steamapps\\common\\Fractal Block World\\Data\\Save\\b;arb\\Chunks\\*"

The result of FindFirstFile doesn't seem to be used, FindNext is only called once and thus only ".", ".." special folders are retrieved. Maybe avoiding repeated FindFirstFile() may already avoid a lot of the overhead.

I am not sure we currently have a good way to substantially optimize this pattern of file I/O in Proton.

TTheRogueArchivist 2024-11-22 github

"Maybe avoiding repeated FindFirstFile() may already avoid a lot of the overhead."

Is this something relevant for Proton development or for the game? I'll be happy to reach out the dev regarding that if it'll be helpful.

Ggofman 2024-11-22 github

"Maybe avoiding repeated FindFirstFile() may already avoid a lot of the overhead."

Is this something relevant for Proton development or for the game? I'll be happy to reach out the dev regarding that if it'll be helpful.

That's for the game.

TTheRogueArchivist 2024-11-22 github

Thank you, I'll forward this info and thread along to the developer, and I'll update here if performance improves.

TTheRogueArchivist 2024-11-25 · hidden on GitHub github

Saving performance issue still present in newly released version 1.01.25 and latest Proton Experimental.

TTheRogueArchivist 2025-01-28 github

Saving performance issue still present in newly released version 1.01.26 and latest Proton Experimental.

Proton versions

Launch options