GUI Unifyer

by snouz

Forces mod buttons to look uniform and aligned, harminizes icons, and adds visual options for buttons. Supports about 116 mods with buttons (=most of them) : Factory Planner, Helmod, YARM, Module Inserter, Bob's mods, Pyanodon, Schall's mods, Todolist, Creative Mod, BeastFinder, Blueprint-request, CleanMap, Death Counter, FJEI, 248k, Hive Mind, Outpost Planner, Silo Stats, Attila Zoom, Zoom, Auto Trash, Teleportation, RPG, Trashcan, Kuxynator's mods, Factorissimo2...

Tweaks
2 years ago
1.1
43.5K

b Performance issues

2 years ago
(updated 2 years ago)

Running this on a server and it seems to be constantly using at least 0.3ms of script time at best, but most often it is 2 to 6 ms while players are doing things (the only time we can seem to get it even as low as 0.3ms is when everyone stops doing anything). This is causing the slower players to be constantly dropped from the game because they are unable to catch up.

As it is we would opt to remove it at this point, however the message on the information page here warns against doing that as it will leave empty buttons behind. Would there be any way of fixing either the performance issues or perhaps adding a settings option that can be selected that reverts its changes so it can be uninstalled safely after that option has been set and that map saved?

We all absolutely adore the visual changes this mod performs, but when we figured out that when the players are doing things that it causes its script time to significantly increase, which we've confirmed precisely matches the time of when some players are dropping, stability of the player connections are far more important than looks. πŸ™‚

2 years ago
(updated 2 years ago)

We've seemed to confirm that it happens exclusively when the left mouse button is pressed for the huge multi millisecond times, which unfortunately is very common especially when there are multiple players. Even the idle script time of 0.3ms is still unusually high...

2 years ago

I know this is a small thing, but you could get a little bit more performance by replacing all the game.active_mods["..."] checks and instead only check them once when the script initially loads and then save that into a top level local variable in the file and then just check that local variable instead, querying the active mods is causing a hash map lookup across the function called boundary, which although is not too bad in cost, is still not nearly as near free as a local boolean variable, especially when called very often.

2 years ago

Should if not player or not player.valid then return end perhaps instead be something else otherwise players might be skipped (due to returning from the function) if someone earlier in the list happens to not be logged in at that moment?

New response