Fast Mod Audio Load

If you liked this item, please rate it up on Steam Workshop page.

Author: llunak

Last revision: 18 Dec, 2024 at 06:18 UTC

File size: 188.55 KB

On Steam Workshop

Description:

This mod reduces load times for mods that provide additional music, significantly so on Linux.

Description

On Linux, when RimWorld loads audio files from mods, it loads them all during startup. If using mods such as P-Music and Actually Vanilla Music Expansion, this can easily add about 20 seconds to game startup time (measured on AMD 8600G, Samsung 970 EVO Plus SSD). As all the music files are uncompressed into memory by default, this also wastes a lot of memory, about 2.5GiB RAM for the two mods mentioned.

This mod switches loading of larger audio files from mods to streaming. Such audio files will be loaded later on demand.

Notes

The cost of loading audio from mods on Windows is relatively small (P-Music loads in ~1 second), as the Windows version of RimWorld uses different code to handle audio. It still appears this mod makes loading about 4-5x faster, so this might make a diference if you use extensive audio mods. Audio loaded using the Custom Music mod is not affected, as it uses the same streaming method. The only known downside to using this mod on Windows is losing support for mp3 and aiff formats, but such music mods would not be portable, so possibly those do not exist.

The situation on platforms other than Windows and Linux is not known.

RimWorld has built-in functionality to find out what costs the most during start. It may be useful to help you find out how to reduce you start time. See here.

GitHub: https://github.com/llunak/rimworld-fastmodaudioload