I have a mod that generates 59000 items viewtopic.php?f=190&t=106078 . I'm trying to migrate it to 2.0. One of the changes in 2.0 is that many non-alphanumeric characters are no longer allowed in prototype names. Many of my items have used the character "|" which was removed, which means that I need to migrate every item prototype name. I didn't see a way to do this in Lua so I have to do it in JSON.
This ends up taking an extremely long amount of time, almost 17 minutes for this single migration to run. During that time, the progress bar only changed once, from 0% to 100% instantly. Most of the items don't exist in the world in a given save file, and don't end up getting shown to the user on the migration screen since they're hidden.
I would really like to be able to migrate these without such a long delay with no feedback from the game, or at least some way to warn the user that it'll take so long. (Although really I'd prefer to be able to use "|" in prototype names)
I attached the log file (ignore the mod error at the end, that's a different WIP error), the migration file standalone, the WIP version of the mod, and a save file I'm trying to migrate
[2.0.66] Mod performance issue: Trouble migrating massive amounts of item prototype names
-
- Inserter
- Posts: 23
- Joined: Fri Jan 31, 2020 5:10 am
- Contact:
[2.0.66] Mod performance issue: Trouble migrating massive amounts of item prototype names
- Attachments
-
- FactorioChem Test 3 1.1.zip
- (2.84 MiB) Downloaded 5 times
-
- FactorioChem_1.2.0.zip
- (19.83 MiB) Downloaded 4 times
-
- 1.2.0.json
- (4.09 MiB) Downloaded 4 times
-
- factorio-current.log
- (8.83 KiB) Downloaded 4 times
Re: [2.0.66] Mod performance issue: Trouble migrating massive amounts of item prototype names
I did some improvements around this logic 2 weeks ago pending a release of the next experimental game version. It makes it faster - but it will always take some amount of time. The issue is compounded by migrations running for each blueprint in the save file and each blueprint in your library. There's simply no way to remove the migration cost of having that many migrations.
If you want to get ahold of me I'm almost always on Discord.
Re: [2.0.66] Mod performance issue: Trouble migrating massive amounts of item prototype names
After the changes I made 2 weeks ago, the provided save file and mod load in a few (3) seconds on my laptop.
If you want to get ahold of me I'm almost always on Discord.
-
- Inserter
- Posts: 23
- Joined: Fri Jan 31, 2020 5:10 am
- Contact:
Re: [2.0.66] Mod performance issue: Trouble migrating massive amounts of item prototype names
Ok cool thank you, 3 seconds is perfectly reasonable. Looking forward to testing it.