Ender IO Forestry

Ender IO Forestry

954k Downloads

Item Conduit Extraction Speed decreasing with more Speed Upgrades

BrainInBlack opened this issue ยท 8 comments

commented

Issue Description:

Extraction speed decreases dramatically the more speed upgrades are used inside an item conduit.

What happens:

After adding more that 4 speed upgrades to an Item Conduit, the extraction speed gets below the extraction speed without any upgrades. Around 1 Item/Stack per second (estimate).

This is independent of the container the Conduit is attached to. Tested pretty much every chest available to me in my personal modpack (all default settings for ender io, except a recipe conflict in the alloy smelter and some client side settings).

What you expected to happen:

Quite simply, adding more upgrades resulting in more speed.

Steps to reproduce:

  1. Place 2 Containers in the World (any chest will do)
  2. Connect both Containers via Item Conduits
  3. Setup one connection up as an Extract and add more than 5 speed upgrades
  4. Setup the other connection as an Insert (w/o filters, etc.)
  5. Put an assortment of different items inside the "extraction" container

Affected Versions (Do not use "latest"):

  • EnderIO: 5.0.40
  • EnderCore: 0.5.45
  • Minecraft: 1.12.2
  • Forge: 14.23.5.2814
  • SpongeForge? no
  • Optifine? no
  • Single Player

Your most recent log file where the issue was present:

https://gist.github.com/BrainInBlack/a0699b262333ca087ea150d739ec76b7

commented

Speed upgrades increase the transferred stack size, rather than extraction rate.

commented

Well, then the extraction speed should be constant, which it isn't. Beyond 4 speed upgrades the extraction speed, regardless of stack size, slows to a crawl.

commented

The item conduit extraction goes into a kind of sleep mode when nothing could be transferred to avoid using too much CPU time:
https://github.com/SleepyTrousers/EnderIO/blob/master/enderio-conduits/src/main/java/crazypants/enderio/conduits/conduit/item/NetworkedInventory.java#L110

Eg assume you have a full chest of stuff and insert into a large collection of barrels/drawers etc - but they are all full. Without the sleep mode it would check every item stack in the source inventory against all destination inventories each game tick (or how often it extracts).

Edit: this also means if you extract faster than you fill your source inventory that you enter sleep mode because the source inventory was empty.

commented

This should show exactly what i mean: https://youtu.be/AJEeQcUkzhk

As you can see, even if the target container has more than enough space left, still the extraction slows to a crawl. It doesn't matter in what order i do these "tests" the result is always the same regardless of the target container.

commented

I am not sure what happened in the first instance. From what I can tell it was a desync situation. But for the rest, yes it pulls a item stack from a slot at the same time, but just one stack of up to a certain size, so it looks fine to me.

commented

I get the concept of more upgrades can pull more items from a stack. What i don't get is why less upgrades seem to move smaller stacks in a much higher rate than with more upgrades. Shouldn't the rate at least stay the same?

commented

This may be counter intuitive, but it actually is intended. The more items a connection can transfer per operation, the less operations it does. This is to reduce server load.

If you need to transfer small stacks of different items, don't put speed upgrades in. If there are large stacks of the same item, speed upgrades will drastically improve the throughput.

PS: And if you're interested in why we did that, just read through any of the about 300 "OMG!!11!! conduits are causing lag" issue tickets in this tracker...

commented

Yeah, that might be something worth documenting, so that idiots like me know what's going on.

Anyway, thank you for clearing things up ;)