However, when I tested linked chests, they seem to take longer to process (higher ms cost and lower ups) when you have more of them linked, but disproportionately so.
In this setup, I have 180K linked chests (all linked to the same inventory) and 100 inserters. The Update time is 45 ms. The problem occurs only with the linked-container prototype, and only when the chests share an ID. Extra details provided below:
In editor I tested a lot of setups. To summarize:
72K inserters, 36K assemblers and belts. Update 9.8 = ms.
72K inserters, 72K 1-slot chests and 36K assemblers. Update = 10 ms.
72K inserters, 72K 1-slot linked chests (fixed slot amount, not increasing with each linked chest. Modified the inventory size of the vanilla linked-chest prototype) and 36K assemblers. Update = 240 ms, but some spikes creep to 480 ms.
72K inserters, 36 1-slot chests (super wide chests using MergeChests mod) and 36K assemblers. Update = 11 ms.
At first I thought - clearly more entities will cost more UPS, so linked-chest isn't the problem. However, using 1-slot chests (simple containers) uses the same amount of entities and works as well as belts.
Then I thought - perhaps many inserters interacting with the exact same inventory are causing the problem (doing something like reserving items (Rseding91 confirmed inserters don't reserve items, thanks!)). However, using the WideChests mod, I don't notice UPS problems when upwards of 2K inserters are interacting with the same inventory (Update is just 1 ms higher than individual chests).
I managed to boil down the problem to a simple setup that presents the performance problems without any mods - save attached as "LinkedChestScaling".
I can reproduce the issue in new saves. But as an extra bit of information - I can create a new world and build the setup until each update takes ~15 ms in my machine. But then when I save and reload the same save, now each update takes ~48 ms as depicted in the screenshot (!). It happens with or without Space Age enabled.
Also, the issue only happens if the linked chests are all linked to the same inventory. If 179.9K chests have a linkID=2 and only 100 linked chests (the ones interacting with the inserters) have linkID=1, the performance cost doesn't happen.
I'm making a bug report because when communicating with other people in Discord, we all thought the behavior seemed weird - we didn't expected linked-container "networks" to have a higher UPS cost when more containers were added, we only expected them to be pricier when the inventory had more slots or when more inserters interacted with it.
Thanks for your time
