#Efficient Storage BETA VERSION - Factori...
1 messages · Page 1 of 1 (latest)
how does it work under the hood? no convenient github link to quickly glance without downloading 😇
Yeah, haven't got that set up yet. Its almost identical to Memory Storage by NotNotMelon, where it stores the total amount and some other data in global. The actual container only has two item slots, and it gets updated every second. A combinator on top is used for circuit connections. I'll throw it into github now
ah i misread "ups alternative" as one that didn't update often and was curious what magic you were using behind the scenes
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
still nice to see improvements in this field
@spiral wind github is connected
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...
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
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
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
@rancid creek i would appreciate your thoughts on dynamic polling , and how such a system could be implemented
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