Page 1 of 1

Single-content chests

Posted: Wed Oct 03, 2018 11:40 am
by zOldBulldog
In a different discussion there was a comment as to how when an inserter puts an item into a chest it must check every slot, causing a UPS drain (which can become huge with mods that allow for "big chests" like warehousing mods).

That immediately made me think:

- What if we had a checkbox in the chest UI that allowed us to designate it as a single-type-of-item chest.

- Or better yet (thanks Trebor for the idea) why not detect automatically that the chest contains only one item type?

The implications:

- If you do not turn on the option, chests behave as now.
- If you check the option, the chest essentially becomes a "single slot" that can contain [stack size of the item] * [number of slots]. With a simple if-then-else condition and a multiplication... UPS drain from checking multiple slots is gone.

I don't know if the mod API already allows controlling this kind of behavior, but if it doesn't then perhaps adding the ability would let the warehousing modders use it, which in itself would be an excellent test. Then if it works as well as I suspect it will, the core app could adopt it.

Re: Single-content chests

Posted: Wed Oct 03, 2018 12:04 pm
by Factoruser
You can limit the size of containers with the red X button, and use filter inserters. Further you can lock slots for specific items in cargo wagons, just like in your toolbelt.

Re: Single-content chests

Posted: Wed Oct 03, 2018 12:55 pm
by zOldBulldog
Factoruser wrote: Wed Oct 03, 2018 12:04 pm You can limit the size of containers with the red X button, and use filter inserters. Further you can lock slots for specific items in cargo wagons, just like in your toolbelt.
I am afraid you completely missed the point.

- This option is NOT to get the ability to have only one type of item in a chest, as it is obvious that we had that ability for ages.

- This option is about saving UPS "when" you only have one type of item in the chest.

UPS is one of the main limitations for megabases and the developers have been diligently tweaking the game over time to improve that situation. This suggestion is just an idea for one more step in that direction.

Re: Single-content chests

Posted: Wed Oct 03, 2018 1:12 pm
by Trebor
Instead of an option it should be an optimization. A chest should be flagged as single item until two different items are placed in it. It stays flagged as multi-item until the last different item is removed.

Re: Single-content chests

Posted: Wed Oct 03, 2018 1:15 pm
by zOldBulldog
Trebor wrote: Wed Oct 03, 2018 1:12 pm Instead of an option it should be an optimization. A chest should be flagged as single item until two different items are placed in it. It stays flagged as multi-item until the last different item is removed.
Excellent point. No need to even have the option, just auto-detect it. Editing my original post with this suggestion.

Re: Single-content chests

Posted: Wed Oct 03, 2018 9:50 pm
by foodfactorio
oh, is this the chest reason why my older game using Cascading Warehouses, suddenly started going much much slower when i upgraded belts and loaders? (when i when back to red belt it seemed to be ok)

sorry for several screens, but its about half-way down my posting here
viewtopic.php?f=190&t=34176&hilit=bees&start=20#p294780

Re: Single-content chests

Posted: Wed Oct 03, 2018 10:09 pm
by zOldBulldog
foodfactorio wrote: Wed Oct 03, 2018 9:50 pm oh, is this the chest reason why my older game using Cascading Warehouses, suddenly started going much much slower when i upgraded belts and loaders? (when i when back to red belt it seemed to be ok)

sorry for several screens, but its about half-way down my posting here
viewtopic.php?f=190&t=34176&hilit=bees&start=20#p294780
I believe it is. I just started using the Warehousing mod but I was warned to use only the smallest ones as "more slots = much slower inserter performance".

I think I might even consider sticking to wood or iron chests when size does not matter instead of using steel chests without thinking.

Given that information the only warehouses I am planning to use are the smallest and only when unloading from a train, since you would get free belt balancing by using a warehouse instead of 6 chests (and most belt balancers eat throughput for breakfast).

Re: Single-content chests

Posted: Wed Oct 03, 2018 10:31 pm
by foodfactorio
ok thanks for the info, that was probably my largest base so far lol, and it is nothing like a megabase :)