gigaherz / Ender-Rift

The Powered Bottomless Storage System
https://www.curseforge.com/minecraft/mc-mods/ender-rift
BSD 3-Clause "New" or "Revised" License
12 stars 6 forks source link

[1.12.2] Large amounts of storage causing TPS lag #37

Open jefferyrlc opened 6 years ago

jefferyrlc commented 6 years ago

Exactly as posted. Storing a large number of items in the ender rift causes serious TPS lag even in a single-player game. It is especially noticeable when directly interfaced by an AE2 or Integrated Dynamics/Tunnels networks.

Ender-Rift version: 1.12.1-2.1.9 Forge Version: 14.23.3.2655

jefferyrlc commented 6 years ago

Okay some corrections. Using an AE2 storage bus or an ID Item Interface directly on the Ender-Rift causes noticeable TPS lag. Using an import bus on the rift into AE2's storage so far does not.

gigaherz commented 6 years ago

I'm not sure there's anything I can do about that. How large is "a large number of items"? The vanilla way to notify of inventory changes doesn't have any way to specify WHAT changed, meaning if there's 10000 stacks in the rift, any machine that needs to scan for specific items will inevitably have to iterate over those 10000 stacks over and over. I don't know if AE2 has any specific API to help with that, but I'm going to guess the other mods don't use it, so even if I could improve performance for one of the mods, it would be specific to that one mod.

Jacob345k commented 5 years ago

Any amount of items more than 100k will cause massive tps lag, here is a screenshot of me and my other admin's conversation. I really hope this gets fixed, as I love this mod, but it is unusable in it's current state. https://i.imgur.com/bkWsaQM.png

gigaherz commented 5 years ago

Thing is.... it's not really a bug... there's just not much I can do about other mods accessing a massive rift, and being spammed with 100000 items while looking for something, the item handler API just doesn't provide any feature to help with that.

I will take a look at the possibility of implementing AE2/RS APIs, which I assume they have, but right now I'm busy porting my mods to 1.13.