Big Containers UPS+


Adds a selection tool that reduces inventory sizes of storage buildings for UPS savings. Mod created by request!

Utilities
6 months ago
1.1 - 2.0
1.56K
Storage

g How does this work?

10 months ago

You claim that this mod has an impact on UPS.
My question is: why would reducing storage space in entities have any non-neglectible impact?

LuaInventory should be basically an array, so access should be O(1).
The only impact I can think of are inventories where the looked for item-stack is faaar down in the list, which would make it O(n), which is still neglectible and a worst case scenario, since (at least in my games) inventories are usually full and only contain one item type and therefore only the first item stack is considered as its the correct one.

Any reasoning why this should have a non-neglectible impact on UPS?

10 months ago
(updated 10 months ago)

Hey, thanks for taking a look at the mod!

You won't notice it until you both A) get pretty far into a megabase and B) are using warehouse-style containers in many of your standard designs, such as train stops. This forum post discusses the issue.

In short the UPS impact has more to do with putting items into containers than taking them out. The inserter has to check each slot in a container for where it can put the items in, which for a full container (most scenarios) means every slot is checked for every insertion.

This kind of UPS impact isn't something most people will ever be aware of, and for those it does affect I believe they will see around 2-4 more updates per second. The important part is that at that point of gameplay you are doing everything you can to get every bit of UPS back that is possible, so this is just another tool in the box for those players that is basically free UPS for existing designs.

Space Age actually gives us a convenient way to experiment with this and observe the slowdown - start a new world and go into editor mode. Put down a cargo landing pad and a few hundred or thousand storage bay extensions to pump up the capacity to stupendous levels. Then surround the bay with as many inserters as you can fit and have them start putting items into it.

10 months ago

Interesting. thanks!

6 months ago

So what is safe slot treshhold a chest to have? Im asking cos im using Merging chests and for train stops as well. UPS usualy gets a big hit on megabase levels, but this was before 2.0 and now even Space age have increased storage space with quality and Cargo Landing example is prefect example as you can build the biggest chest there ever existed.

6 months ago
(updated 6 months ago)

Did some testing with inserters as I was inspired by this question and really the default size this mod uses should be 1 slot (sorry flart, you were right to ask).

So the answer is just set it to 1. I'm changing the default value to 1 in the next update because it might as well be set to the "most beneficial" possibility to start with.

Landing pads don't really matter because there's only going to be 5 of them in most games. Will see about adding functionality to swap the cargo bay add-ons to versions with lower inventory size bonuses.

6 months ago

How many chest slots does "1" results in?

6 months ago

When the "UPS+ Box Size" setting is equal to 1, the UPS+ versions of containers will have a storage slot count of 1.

I added cargo bay swap functionality to the latest update (UPS+ version can send/receive cargo but only adds 1 slot to the hub/landing pad)

6 months ago

You telling me normal iron/logistic chest of 48 slots and if you apply quality which results more slots, its already hurting UPS a lot?

6 months ago

No, I am saying that if you are going to use this mod and swap some larger containers so that they will have fewer slots, then they might as well be reduced all the way to just 1 slot

Why don't you play the game a while and see if the quality chests turn out to be an issue? I would not expect them to be

6 months ago
(updated 6 months ago)

You telling me normal iron/logistic chest of 48 slots and if you apply quality which results more slots, its already hurting UPS a lot?

Yes, thats the conclusion from the linked forum post. Every single non-blocked/red inventory slot = bad. So unless you need the item biffer, your chest should all have only 1 slot of inventory enabled.
Technically you dont need this mod to do the mentioned performance improvement: just block the slots in the chests with the red x.

6 months ago

At the time, I also have done some testing:
https://mods.factorio.com/mod/WideChests/discussion/6560e6cb2f8276f110b91975

"Update" field:
1000 slots: ~35
1 slot soft limit: ~11
1 slot hard limit: ~7.8

so "hard limit" is still better than "soft limit" (red cross)

New response