First off, I'm a big fan of the JavaScript framework Vue.js and I find GUIs to be the most frustrating part about Factorio modding.
Naturally, for those of you who are familiar with Vue.js, I don't really expect Factorio to provide similar functionality.
But I am however wondering how big the performance impact is in Factorio if a GUI is destroyed and recreated within the same tick (to basically do a "complete refresh" of the GUI). Is the game engine smart enough to only update the affected elements or will there be a big performance penalty for destroying and recreating GUI elements and potentially huge complex nested GUIs?
GUIs - is there a performance impact of destroying and recreating?
Re: GUIs - is there a performance impact of destroying and recreating?
Destroying and recreating a GUI will do just that; there's no logic to say "well this one was close to the last; so re-use stuff" - it just destroys and re-creates.
If you want to refresh; just refresh. Anything you can set during creation you can set after creation by just assigning.
If you want to refresh; just refresh. Anything you can set during creation you can set after creation by just assigning.
If you want to get ahold of me I'm almost always on Discord.