I'm completely dumbfounded as of what is going on here. I'm working on a new mod, and while working on it several saved games started taking several minutes to load. Obviously I'm doing something wrong in my mod, so I started commenting out code to narrow down where the error is. Although, I couldn't find the problematic code. So in the end I decided to just delete everything in the mod except info.lua and control.lua (which I left completely empty). Yet, loading a saved game takes a long time. Then surely the issue must be with the savegame itself and not the mod, so I disable the mod, but now the game loads instantly‽
My next thought is that there's something wrong with my Factorio installation (through Steam), so I download the latest experimental release (0.14.12) from the website, copy in the (attached) zips for savegame and mod and start up the game. Even here the game spends an excessive time to load the savegame when the mod is enabled, while it's instant as soon as i disable the mod.
One more piece of information about the savegame: When I saved it I had several other mods enabled, including a halfway completed version of the mod I'm writing. The map however is practically empty (I don't think I built any entities before saving, although I probably removed some trees with a Deconstruction planner). Cheat mode and other settings for sandboxing (checking of everything in the Creative Mode dialogue) has been enabled.
I'm strongly beginning to suspect that there's a bug in the game causing this behavior, but before I report it I'd like to hear other's thought about it. Even better: If you can try to load the attached savegame with the attached mod (both enabled and disabled) and report back then it would be very helpful. I'm running the game on Arch Linux and have no Windows installation to test on.
I'm travelling around a bit this weekend, may take some time before I can respond.
[Solved] "Empty" mod causing extremely long load time
[Solved] "Empty" mod causing extremely long load time
- Attachments
-
- auto-upgrader_0.1.0.zip
- "Empty" mod triggering long load time
- (725 Bytes) Downloaded 75 times
-
- creative_mode.zip
- The savegame
- (1.63 MiB) Downloaded 72 times
Last edited by canidae on Mon Oct 03, 2016 9:04 am, edited 1 time in total.
Re: "Empty" mod causing extremely long load time of save game?
Sounds like a bunch of junk data was created by an earlier version of your mod. That gets removed if you load it without the mod, but not if the mod is still enabled.
Re: "Empty" mod causing extremely long load time of save game?
Cheers for your feedback. This sounds like a plausible explanation, but I'm still not sure exactly where I do gather such large amounts of data. I'll have to debug a bit, don't have time for it right away.DaveMcW wrote:Sounds like a bunch of junk data was created by an earlier version of your mod. That gets removed if you load it without the mod, but not if the mod is still enabled.
I did briefly dump the contents of a table I'm storing some data in, and right on the money, it's full of crap. Haven't figured out why there's so much data in that table yet, but I'll solve that mystery when I'm back from my travels.
Thanks again!
Re: "Empty" mod causing extremely long load time of save game?
In case someone else should come upon this thread in the future:
DaveMcW was right. I intended to track entities built by player forces, but I accidentally included entities of the "enemy" and "neutral" force as well. So even though there were no player built entities nor enemies on my test map, there still was nearly 40k trees and rocks which was added to a data table.
DaveMcW was right. I intended to track entities built by player forces, but I accidentally included entities of the "enemy" and "neutral" force as well. So even though there were no player built entities nor enemies on my test map, there still was nearly 40k trees and rocks which was added to a data table.