TheAnsuz / Lethal-Company-Configurable-Company-API

An API for Lethal Company that allows other modders to create in-game options (configurations) that persist between sessions, synch between players and are save-file dependant so you can customize your every game differently.
4 stars 1 forks source link

[BUG] Insane loading time when a large amount of moons have to load #70

Open MrCreeps5000 opened 1 month ago

MrCreeps5000 commented 1 month ago

Describe the bug

The time it takes to load the per-save configs on the main menu is insanely high with a moon-heavy modpack I can confirm this was due to the moons I had, as upon disabling all of the custom moons the load time for the per-save configs was cut down to only a few seconds.

How to reproduce the issue

Load up the game with a modpack that possesses a large amount of moons (and potentially scrap items for said moons too)

Mods and profile

Profile code: 019222a8-f285-dcdb-f730-e2604e87e3b9

Extra information

If the variable mod wasn't per-save file and instead just used an ordinary config file then it wouldn't have to load so much information with a large modpack

TheAnsuz commented 1 month ago

Hello @MrCreeps5000

Im sorry but Configurable company is designed to have separated configurations for each file. It cannot load the same configurations for different files, for now it has been optimized to deal with stuff easier but further optimizations are already planned.

As of now this is caused by a huge amount of configurations and the CPU processing all of them. For now this behavior should only happen when changing from file to file, which is not done so often.

Thank you in advance, I will notify using the issue once there is an update on the optimizacions.

MrCreeps5000 commented 1 month ago

Sounds good, thanks for continuing to look into the optimization