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!
< >
Showing 1-5 of 5 comments
2Dfruity 10 Jan, 2020 @ 7:11pm 
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 @ 10:30am 
is this fixed?
Das 5 Feb, 2020 @ 9:11pm 
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 @ 4:42pm 
I'm guessing this is still an issue?
Alfuken 23 Sep, 2020 @ 2:50am 
end of September, still no update if the issue is fixed... wow
< >
Showing 1-5 of 5 comments
Per page: 1530 50