protonscr

Memory allocation performance degradation on 10.0-4 and 9.0-4. Experimental and Hotfix are fine.

protonclosed
ValveSoftware/Proton#9512 · opened 2026-02-19 by FedyuninV · updated 2026-04-23 · 2 comments · github
2 matching comments, n / p to jump
FFedyuninV 2026-02-19 github

Affected versions:

  • 9.0-4 (version 1749140930 proton-9.0-4f)
  • 10.0-4 (version 1769167055 proton-10.0-4)

Not affected:

  • Hotfix (version 1761930768 hotfix-20251031)
  • Experimental (version 1770737294 experimental-10.0-20260210)
  • some older versions (probably November of 2025, mb beginning of Dec 2025)

I'm currently testing new game on Steam Deck (not released yet) and I'm facing significant performance difference in memory allocations speed between different Proton versions.

Only parts of the code which make a lot of small allocations currently affected. And the effect worsens with time (probably memory fragmentation, or specifics of allocator's implementation)

What is more strange is that the behavior depends on the Proton version selected in Steam Compatibility tool. If selected version is 9.0-4 or 10.0-4 (can't launch on 8.0-* at the moment) the performance is slow. But if you select Proton Hotfix or Proton Experimental then everything works perfectly.

The problem is that I can't find what can possibly cause such drastic change (these "malloc-heavy" functions may work 10x times slower), and I can't figure out where Proton Hotfix comes from. The diff between it and Proton 10.0-4 should contain the fix.

May be all what I need is one flag/environment variable...

x-axis - index of iteration in for-loop, which makes the same allocator-heavy operation on every step
y-axis - time in seconds

Image

2-3 months ago problem didn't exist either, don't have specifics though

P.S. for now, I can't find a way to use versions like 10.0-3 or 9.0-2, which is why I can't locate the culprit more accurately

FFedyuninV 2026-02-19 github

I think I got the main candidate as a fix.

I took wine from proton_10.0 as a "bad" version
and from experimental_10.0 as a "good" version.

The only difference in dlls/ntdll/heap.c is this commit which allows heap to have more than 32 groups as a backup.

For some reason (intentional or bug) it hasn't been included in 10.0-4
("good" version from experimental)
Image
("bad" version from 10.0-4)
Image

It kinda makes sense in the context of my problem: earlier it held up to ARRAY_SIZE(affinity_mapping) as reusable, and now it holds the "max amount of simultaneously allocated groups", and in my case the code which contains the lots of small allocations suffers most. But I still don't get why it gets worse from iteration to iteration?

And I still don't know how Proton Hotfix has been assembled (and does it include "fix")?

FFedyuninV 2026-04-23 github

This commit is included in 11.0 beta, thanks!

Proton versions