spdskatr / ProjectRimFactory

ProjectRimFactory - A combination of my 3 automation mods.
MIT License
31 stars 11 forks source link

Caretaker Drone Station causing lag #33

Open ruifung opened 5 years ago

ruifung commented 5 years ago

I suspect it's searching for hauling jobs a little too aggressively. As the lag goes away when I put the station into lockdown.

alexbonasera commented 5 years ago

I have noticed that the lag is generally caused by specific hauling jobs. I had compiled a version that printed a message to the log of how long each job took (each iteration of the main for-loop in TryIssueJobPackageDrone) if it was over 100,000,000 nanoseconds and it was consistently hauling jobs being displayed and sometimes going over 200,000,000 nanoseconds. These are some of the problem ones.

From Core or unsure

From Please Haul Perishables Mod

From Garden Tools Mod

There was also one related to something like "Hauling things to building frames" but I don't remember exactly or what mod it might be from.

Speculation: The lag doesn't seem to occur all the time and I haven't done any tests with just ProjectRimfactory installed so it could be mod conflict related. At the very least I am almost certain the problem occurs in TryIssueJobPackageDrone but whether it's caused by this mod, a different mod, or the core game I'm not sure. Also the problem seems to become more noticeable (more hauling jobs were taking over the 100,000,000 nanosecond threshold) when using storage crates and then more so when using cargo platforms so it could have something to do with items being stacked on top of each other but again I'm not sure.

Maxzhao1999 commented 5 years ago

Just here to say that this has also happened to me. It works fine for construction and farming bots but hauling ones are really lagging the game out

edit:typo