Pipez

Pipez

31M Downloads

1.19 Lag or crashes with Tom's Simple Storage "Inventory Connector"

Raidobw2 opened this issue ยท 4 comments

commented

Bug description
If you set a pipe to extract from a Tom's Simple Storage "Inventory Connector" you'll be experiencing lag or a server crash, or both

Steps to reproduce the issue

  1. Place a Inventory Connector
  2. Place some chests around it
  3. Try to extract items from it using an Item Pipe

Expected behavior
No lag, some eco mode with the pipes, or no crashes

Log files
https://gist.github.com/Lauriichan/308d121880679dbfce9649231b227db3 (comes from FTBTeam/FTB-Modpack-Issues#1278)
https://spark.lucko.me/26PexTrAQz <= shows the source (comes from FTBTeam/FTB-Modpack-Issues#1260)

Versions

  • Minecraft 1.19
  • Forge version 41.0.63
  • Mod version pipez-1.19-1.0.3.jar

Other mods
Tom's Simple Storage mod
toms_storage-1.19-1.3.5.jar

Screenshots (Optional)
image

Thanks in advance

commented

Please send me your crash logs.

commented

Hi sorry for the delay, I asked a user for their crash log but they didn't have one anymore, so I went and replicated it just now.
crash-2022-08-25_23.25.38-server.txt
Paste for convenience: https://paste.feed-the-beast.com/view/7f777297

To replicate this:

  1. Install the 3 mods: Pipez, Tom's Simple Storage, Iron Chests
  2. Load a local server and a client
  3. Place a diamond chest in-game, fully fill it with stuff
  4. Ctrl + Middle Click to copy chest nbt
  5. Place an Inventory Connector from Tom's Simple Storage
  6. Place about 50ish of these filled diamond chests connected in any manner to the Inventory Connector, like you would with Storage Drawers
  7. Place a bunch of Pipez cable attached between the Inventory Connector and one chest, add random filters to the cable (about 10 in my test)
  8. Extend that pipez cable as long as you want
  9. Take a furnace and place about 30 of them with their backs as the means of connection to the pipez cables
  10. Watch the time per tick rise
  11. Eventually the server crashes with the presented crash log, in my case, took about 1-2 minutes after those furnaces were placed

Let me know if you need any other info, I hope that will help locating the issue and thanks for your time

commented

My fork
image

Original Pipez
2022-08-26_13 32 14

My Kotlin implementation
image
image

I think piping and filtering with 108 * 50 slots cannot be optimized so much....

private boolean canInsert(PipeTileEntity.Connection connection, ItemStack stack, List<Filter<?>> filters) {

commented

Oh, I see.
So basically one pipe is handling pulling from 50 diamond chests.
Yeah thats not really a bug. The pipe needs to check every slot of every diamond chest every tick. Its completely normal that theres gonna be a lot of lag.

An iron chest has 108 slots. With 50 iron chests, this is 5400 slots, the pipe need to check if any of these items fits into any of the furnace.