Page 1 of 1

[Rseding91] [2.0.28] Placing higher quality roboport over existing roboport causes lag/stutter

Posted: Thu Jan 16, 2025 12:00 am
by MagicHat42
As the title says. I'm currently going around Vulcanus upgrading my roboports to uncommon quality, and whether I place them down myself or my bots do it there's always a fraction of a second where the entire game just seems to stop. Like the entire universe needs to comprehend that I'd just replaced a base roboport with an uncommon one. Gets real fun when I use an upgrade planner and have my bots replace 50+ in one swoop.

My current setup for Vulcanus is extremely bot-heavy, so if that's a contributing factor then I can fix that easily. Otherwise, please let me know what else I can do to assist in figuring this out!

Re: [2.0.28] Placing higher quality roboport over existing roboport causes lag/stutter

Posted: Thu Jan 16, 2025 12:06 am
by Rseding91
I’ll need a copy of the save file to look at it.

Re: [2.0.28] Placing higher quality roboport over existing roboport causes lag/stutter

Posted: Thu Jan 16, 2025 1:28 am
by MagicHat42
My apologies; I'm just getting over being ill and apparently thinking still isn't very tater tots.

Save file should be attached now.

Re: [2.0.28] Placing higher quality roboport over existing roboport causes lag/stutter

Posted: Thu Jan 16, 2025 1:44 am
by Rseding91
I suspect it’s too large to attach.

Re: [2.0.28] Placing higher quality roboport over existing roboport causes lag/stutter

Posted: Thu Jan 16, 2025 3:21 am
by MagicHat42
Odd...the .zip is nowhere near the file size limit. ~65MB, actually. Hopefully I've got it attached now, but I'll keep my fingers crossed.

Re: [Rseding91] [2.0.28] Placing higher quality roboport over existing roboport causes lag/stutter

Posted: Fri Jan 17, 2025 3:21 pm
by Rseding91
Ok, I was able to find some things to improve on and it's now roughly 60% faster for the next release. The main bottleneck is verifying that all robots, and all entities that were in the network are still correct after the roboport has been removed (an upgrade is: remove existing, add new). It needs to check for things like networks splitting, robots targeting that specific roboport, checking if something that was in-network is no longer in-network after removal and so on. It just adds up the larger a network gets.

Re: [Rseding91] [2.0.28] Placing higher quality roboport over existing roboport causes lag/stutter

Posted: Fri Jan 17, 2025 7:20 pm
by MagicHat42
Oh, awesome! I kind of had a feeling about the replacement thing, after I sent the save file I was just removing a few roboports and I saw that right when the "mining" bar filled up was when the momentary lag happened. But being a developer just means I also know it could've been any of two dozen other things I'm not aware of, since I don't look at the code.

Thank you very much for the update! I look forward to the next release!

Re: [2.0.28] Placing higher quality roboport over existing roboport causes lag/stutter

Posted: Sat Jan 18, 2025 3:05 am
by tinker9
MagicHat42 wrote: Thu Jan 16, 2025 3:21 am Odd...the .zip is nowhere near the file size limit. ~65MB, actually. Hopefully I've got it attached now, but I'll keep my fingers crossed.
The attachment limit is actually 30 MB, but some parts of the forums still say 1 GB.

Ref viewtopic.php?f=55&t=124919