Repository navigation
Compilation speed driver terible #229
Replies: 5 comments 1 reply
|
Hey dude, So the main reason why the game takes so long is just the current inherent design of TuxBox, and you're right it's too long and needs to change. When I first started making it and tested Matrix Awakens, it was fast enough to keep up, but a newer release title seems to be a different beast altogether, taking much longer. I'm gonna look into simplifying the translations so there are fewer steps involved, which will bring down compilation times and get in-game quicker from a cold boot. Currently, TuxBox is doing its shader compilation before the game progresses through the menus, as the game natively does; all other similar projects defer the pipelines and force the game to continue, causing terrible FPS and missing textures/shaders. Please bear in mind TuxBox is still in HEAVY development and makes huge changes every day to help progress and improve. My goal is to be at a point that when you load in-game, like actually into the prologue and moving about, it wont run like shit and it wont look like shit. |
|
I have some extra Claude quota to use up, so I'll spend it on this and report what I find. I'll stay out of the translation simplification you're doing, keep compiling before the game moves on as it does now (no deferred pipelines), and look around it at load and test turnaround: cache reuse across launches, host compile and CPU cost, and memory. A cold test run takes about 30 minutes here, which makes every change slow to check. Anything that overlaps your work or the open compile-speed drafts goes here or on that PR first, before any code. |
|
First findings on warm starts, from the cache files and the logs of two launches on an RTX 5090. Everything below is from driver 595.99.02. I've upgraded to 620 and haven't repeated it there yet. 1. The NVIDIA cache index can't address past 4 GiB (measured). The 2. A new translator build costs a live retranslation of everything (measured). The Scarlett launch skips the archive pass ( 3. The translator generation key depends on the checkout path (measured). Building the same tree (facfaab) in two worktrees gives two different Warm against cold on 595, from the same two launches:
The warm launch got through the first 63,000 pipelines in under 5 minutes. The rest was slow compute compiles that should have hit the driver cache (finding 1). I'll repeat both launches on 620 and post the numbers. |
|
Host side of the cold compile path. These are CPU-only measurements over the recorded ProjectScarlett requests at facfaab. Nothing here changes what xshader emits. Where the host time goes (measured, 300 requests, one core): DXC is 97.5% of CPU, xshader 1.3%, DXV 0.8%, and Python and cache writes 0.3%. Starting a process costs 0.3 to 3 ms, so pooling processes or a persistent DXC would save about 1%. A translator change is cheap if the DXIL store is warm: HEAD's HLSL is already in my store for 20,698 of 20,794 distinct programs. Where the cold run's time probably goes (inferred from one log, driver 595): the cold run was not limited by host translation, which averaged about 3 busy workers out of 16. It was the large compute gate. The 638 compute pipelines of 512 KiB or more took 40 minutes to drain through the 4 slots in Two small things I measured. I'd like your view before writing either:
|
|
A measurement for point 2 above, the archive pass before a ProjectScarlett launch, on driver 620 at 68e79b7 (RTX 5090, 32 threads):
So, with the DXIL store warm, preparing everything the two launches translated live would have taken about a minute. The live path took most of an hour, sharing the CPU with the driver compile. A launch that runs this pass (or at least warns, "N recorded shaders are not translated for this build") whenever the translator generation changes would remove most of that. It's still your call whether it should run on every launch, given 290f307. |
Uh oh!
There was an error while loading. Please reload this page.
Hi guys,
I am running into an issue. The shader pre comp runs pretty decent speed. Howevere when i try to run the game it takes forever. Feel like im doing something wrong here. Any ideas how to fix this?
Best,
Bas
All reactions