Create

Create

86M Downloads

Filter cause extreme lag with item vault

gundami opened this issue ยท 5 comments

commented

Describe the Bug

The funnel with filter and brass hopper with filter make server very lag. The tps will drop from 20 to 5. When all the items in vault that can pass the filter, the tps is ok. But the more item that cannot pass the filter, the tps drop more. 40 thousands items in vault make tps drop to 5. Also, the more items in filters also drop tps, from 20 to 12, or worse.
It is preliminarily believed that the filter scan all the items in the vault again and again, makes the extreme lag.

Reproduction Steps

  1. place a vault and fill with item can pass the filter
  2. add item that cannot pass the filter
  3. the more item add the more tps drop

Expected Result

the server tps won't drop

Screenshots and Videos

No response

Crash Report or Log

No response

Operating System

Opensuse 15.3

Mod Version

0.5.0d

Minecraft Version

1.18.2

Forge Version

40.1.80

Other Mods

CosmeticArmorReworked-1.18.2-v2.jar
CreativeCore_FORGE_v2.6.12_mc1.18.2.jar
CustomStartingGear-1.18.1-2.0.3.1-universal.jar
Delightful-1.18.2-2.0.jar
DrinkBeer-Forge1.18.2-c1bfa09c30.jar
EnhancedArmaments-forge-1.18.2-1.1.0.jar
FarmersDelight-1.18.2-1.1.2.jar
FastDecay-1.1.0.jar
HQM-1.18.2-5.11.1-forge.jar
ImmersiveEngineering-1.18.2-8.2.2-154.jar
ImmersivePetroleum-1.18.2-4.0.0-DEV-2.jar
InventoryProfilesNext-forge-1.18.2-1.6.5.jar
MoGuns-1.7-1.18.2.jar
Patchouli-1.18.2-69.jar
Placebo-1.18.2-6.6.4.jar
StorageDrawers-1.18.2-10.2.1.jar
SuperCircuitMaker2-0.2.9+1.18.2.jar
TKLib-0.0.23+1.18.2.jar
alternate-current-mc1.18-1.2.1.jar
architectury-4.7.78-forge.jar
backpacked-2.1.10-1.18.2.jar
bettercombat-forge-1.2.1+1.18.2.jar
blockui-1.18.2-0.0.62-ALPHA.jar
blueprint-1.18.2-5.4.7.jar.bk
car-1.18.2-1.0.3.jar
cgm-1.2.6-1.18.2.jar
chipped-1.18.2-1.2.1-forge.jar
cloth-config-6.2.62-forge.jar
create-1.18.2-0.5.0.d.jar
create-stuff-additions1.18.2_v1.1.8.jar
create_misc_and_things_1.18.2_0.1a.jar
createaddition-1.18.2-20220817a.jar
createbigcannons-1.18.2-nightly-3ebdf63.jar
createcafe-1.9.5-1.18.2.jar
createoreexcavation-0.2.0.jar.bk
culturaldelights-1.18.2-0.13.jar
curios-forge-1.18.2-5.0.7.1.jar
domum_ornamentum-1.18.2-1.0.50-ALPHA-universal.jar
ecologics-forge-1.18.2-1.7.9.jar
engineersdecor-1.18.2-1.1.24.jar
extendedflywheels-1.2.1-1.18.2.jar
flywheel-forge-1.18.2-0.6.5.jar
framework-0.2.3-1.18.2.jar
furnish-1.18-0.6.jar
geckolib-forge-1.18-3.0.36.jar
goblintraders-1.7.2-1.18.2.jar
jei-1.18.2-9.7.0.209.jar
kjsextras-3.0.0.jar
konkrete_forge_1.3.3_MC_1.18-1.18.1.jar
kotlinforforge-3.7.1-obf.jar
kubejs-create-forge-1802.2.2-build.28.jar
kubejs-forge-1802.5.5-build.546.jar
kubejs-immersive-engineering-1802.2.1-build.35.jar
kubejsadditions-2.0.2.jar
lctech-1.18.2-0.0.6.2.jar
lightmanscurrency-1.18.2-1.2.0.6.jar
littlecontraptions-forge-1.18.2.1.jar
littlelogistics-mc1.18.2-v1.2.6.jar
logprot-1.18.2-1.6.jar
lootjs-forge-1.18.2-2.7.4.jar
mcw-bridges-2.0.3-mc1.18.2.jar
multi-piston-1.18.2-1.2.15-ALPHA.jar
neoncraft2-2.2.jar
parrying-1.18.2-2.5.3.jar
personality-1.18.2-2.0.0.jar.bk
player-animation-lib-forge-0.3.5.jar
polymorph-forge-1.18.2-0.44.jar
rhino-forge-1802.2.0-build.232.jar
rsgauges-1.18.2-1.2.16.jar
selene-1.18.2-1.17.5.jar
simpleplanes-1.18.2-4.15.0.jar
sliceanddice-1.0.2.jar
smallships-1.18.2-2.0.0-Alpha-0.3.jar
spark-1.9.11-forge.jar
starlight-1.0.2+forge.546ae87 (1).jar
structurize-1.18.2-1.0.424-ALPHA.jar
supplementaries-1.18.2-1.4.12.jar
toms_storage-1.18.2-1.3.4.jar
xlpackets-1.18.2-1.3.jar

Additional Context

No response

commented

Did you ever find a solution/workaround for this?

commented

I'm having the same issue in 1.19.2 (latest verision, 0.5.0.i)
For me this already happens when a stack size is set on a funnel.

I'm running a dedicated server, and the players tried to use the stack size to reduce lag, with the idea to only transport full stacks of items. however this backfired and now we needed to adjust every single funnel back to ignore the stack sizes.

By the way, this was already reported in january but closed by a bot due to inactivity: #2709. not sure if this has changed since then, but it might be a good idea to not let a bot close issues due to inactivity.

commented

Same problem here with Allthemods 8, on Minecraft 1.19.2. Brass funnels attached to a vault and with some stack size on filter, are so laggy. I hope this issue get some attention from developers. As "Create machines" are usually chunkloaded, this gives you lag to the whole server although you are far away.
The issue stills going on even with the funnel idle (a stack is already present in the depot).

commented

Not sure about filters/chutes exactly, but I tracked down atleast one issue that was causing major lag from funnels.

In the
https://github.com/Creators-of-Create/Create/blob/mc1.18/dev/src/main/java/com/simibubi/create/content/logistics/funnel/FunnelBlockEntity.java, method activateExtractingBeltFunnel() was causing the most lag according to spark profiler.
I noticed the lag only happens when there's no space available to extract items to. So I read through the code found that startCooldown() doesn't fire when stack.isEmpty() causing the funnel to try extracting every tick instead of every 8.

Don't know if this is intended design but it's most likely what's causing the lag.

Tested the solution - making startCooldown() fire on start.isEmpty() and there's no lag

Edit:
It was intended by the devs to be this way

commented

Fixed in dev