Open Crotalus opened 3 years ago
Against the background of how it reads Music.xwb and textures.scd APL is absolutely insignificant. Now spam requests everywhere has become the norm.
Interesting, I'm not too much into this matter but what is the implications of this, if not performance? Why would the game look for this key?
In 2014 I remember using procmon to find tons of unnecessary reads by GetDiskFileInfo() which read file metadata from disk and parts of the UI used that function.
In combination with FA constantly writing replay + reading music on the same disk resulted in actual stutter in game if people were using HDD. It was enough if one player in game has a slow disk with horrible random access to actually impact everyone, even when it was UI side that did the disk reading.
Much of the "startup" lag people notice after game start are due to this, reading textures of units etc from disk.
It was solved by caching the output of that function. The less disk access the better even if many people today have SSDs.
DirectSound searches for the "Safe Mode" key there.
If you run Process Monitor and filter out ForgedAlliance.exe there's a noticable spam of register key not found while audio is playing in the game (~10 per second)
There was an earlier discussion in the old forum about this: https://forums.faforever.com/viewtopic.php?f=2&t=9451
Especially the last message this was interesting:
Could be worth investigating when someone is bored enough.