[2.0.66] Mod performance issue: Trouble migrating massive amounts of item prototype names
Posted: Thu Sep 18, 2025 10:06 pm
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
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