RimWorld

RimWorld

[1.0] Vanilla Factions Expanded - Core
Found a major source of lag in your mod.
Hey there. Was wondering why my RimWorld was taking an eternity to load after I added this mod. As a programmer, I did some investigation. I found the source of the problem.

You got this block:
public static bool DualWield = ModsConfig.ActiveModsInLoadOrder.Any(m => m.Name == "Dual Wield");

public static bool FacialStuff = ModsConfig.ActiveModsInLoadOrder.Any(m => m.Name == "Facial Stuff 1.0");

public static bool ResearchTree = ModsConfig.ActiveModsInLoadOrder.Any(m => m.Name == "Research Tree");

public static bool ResearchPal = ModsConfig.ActiveModsInLoadOrder.Any(m => m.Name == "ResearchPal");

public static bool RimCities = ModsConfig.ActiveModsInLoadOrder.Any(m => m.Name == "RimCities");

public static bool RPGStyleInventory = ModsConfig.ActiveModsInLoadOrder.Any(m => m.Name == "[1.0] RPG Style Inventory");

public static bool RunAndGun = ModsConfig.ActiveModsInLoadOrder.Any(m => m.Name == "RunAndGun");

Which causes the game to scan the Active Mod list SEVEN TIMES on start! EVERYTIME you call ModsConfig.ActiveModsInLoadOrder, it SCANS THE LIST.

Create a List(of Object) or something, get the list of active mods from the game ONCE, and run your check to set your flags afterward.

When you have 120+ active mods, this makes a HUGE difference!
< >
Viser 1-5 af 5 kommentarer
2Dfruity 10. jan. 2020 kl. 19:11 
This mod adds a good 15 minutes to my startup time. Unfortunately I'll have to unsubscribe until this issue is fixed. @demonseed elite thanks for pointing this out.
Miguel V-DF 28. jan. 2020 kl. 10:30 
is this fixed?
Das 5. feb. 2020 kl. 21:11 
Just wanted to bump in case this isn't fixed. There was an update the day after this was posted, but there is no description for the update history.
Silhouette 28. feb. 2020 kl. 16:42 
I'm guessing this is still an issue?
Alfuken 23. sep. 2020 kl. 2:50 
end of September, still no update if the issue is fixed... wow
< >
Viser 1-5 af 5 kommentarer
Per side: 1530 50