#Efficient Storage BETA VERSION - Factori...

1 messages · Page 1 of 1 (latest)

spiral wind
#

how does it work under the hood? no convenient github link to quickly glance without downloading 😇

dark epoch
spiral wind
#

ah i misread "ups alternative" as one that didn't update often and was curious what magic you were using behind the scenes

dark epoch
#

One update per second per container is quite less than once per tick. It's more about decreasing the container size so inserters don't have to search a massive container every tick

spiral wind
#

still nice to see improvements in this field

dark epoch
#

@spiral wind github is connected

rancid creek
#

Theoretically I would prefer that the mod checked a fixed amount of chests per second/per tick (say 10 chest per second).
In this way, if there are few chests on map, you're basically polling them a lot and keeping the update rate high, while if there are a lot of chests, you don't see any performance change, only a chest may be updated instead of 1 per second, once every 2 seconds...

dark epoch
#

It spreads the updates over the full second. Right now it only polls a quarter of the chests every .25 seconds. I can further spread it out if needed

#

The problem with dynamic polling is that some chests can fill up or fully empty while waiting to be polled, so there would need to be some upper limit to prevent that

rancid creek
#

I get that the workload is spread, but I'm saying if there are 2 million chests on map the UPS will drop. VS with constant s of chests per time unit, the performance stays the same

dark epoch
#

I'll look into it. Again, it would need to be fast enough (or chests large enough) that they don't fill or empty in between polls, which would interfere with "vanilla" behaviour

#

I plan on using a system similar to inerter-lib so i can calculate the theorhetical maximum input/output of a single chest in between polls, then set the inventory size based on that calculation (done during data stage, ofc). But that's further down the line

dark epoch
#

@rancid creek i would appreciate your thoughts on dynamic polling , and how such a system could be implemented

rancid creek
#

Probably easiest way is to put all the data in a big list, iter that list at a fixed rate on_tick, and update "last_time_seen" for each entity