Open blubFisch opened 6 years ago
Thanks. i'm downloading the zip now. was the mod heavily used, or just tinkered with a little bit? Was there hundreds/thousands of squads created? So what I am asking is for a small description of how the mod was used so I can try to look at what aspects of the mod may cause it.
It sounds like there was a very very large amount of squads generated and the logic for-loops were getting way too big, and global tables were getting very big.
Hi,
Thanks for the Reply, im one of the other Players. The Mod was used over a longer period of time, we started building bots early and from the Progression of the Game you can see we arent in endgame, but there was quite some time to build bots. As for Creation, I think about 100, maybe 200 Squads created, but not in use - most of them destroyed by biters.
@ChoMar05 Thanks. That isn't an unusual amount, it's pretty low really. I will look at the mod list for the save game, there might be other reasons (like a huge amount of other forces generated by the other mods) which may slow down my mod's loop times and also cause bloat in the global tables. I do a lot of "for each force. .. loop through and process.. " style of code
Only other mod was Nanobots, that one shouldnt cause said Problems. One question: Is the Amount of Squads CREATED important or the amount IN USE? And another thing: Is there any point where the Server would wait for a Response from the Client that could slow things down, is rather large or anything that could be caused by a shitty connection of a client?
because of the lockstep algorithm Factorio uses and the ultra precise requirements of the simulation, if anyone has a shit computer and can't run the mod's logic (or the game in general) very quickly, they will slow down the whole server...
There is nothing explicit in the mod which is large and needs any specific waiting, or any specific server/client stuff. The mod is run by each client, and it should be the same result on everyone's game otherwise it'd desync.
The squads CREATED vs squads IN USE is not necessarily a performance issue, but rather could lead to memory bloat as the tables get larger. The indexing method of Lua means that you can quickly look up a value in a table, but iterating through the table to find valid table entries can be a performance hog after a while. I'm not sure yet if that's what is happening. It might be useful for me to try to print the lengths of each major table used in my mod, to see if any have become absolutely huge for no reason
No Shitty PCs (I think) and no Desyncs. Just someone with Shitty Internet.
If someone is slowing down I think they will just get the catch-up thing or get booted from the game. Nothing should really slow the server down as long as the other players are all fine.
Any progress? :-)
nope :-(
Hi,
Tried a 2v2 with this nice mod, but we had some performance issues:
Here is the save: https://chomarxy.de/nextcloud/index.php/s/q0XgtRBFl3rNI09
Cheers Nils