Integrated Dynamics

Integrated Dynamics

88M Downloads

Notable lag for entities and eating because of 10 exporters with list filters

uhloin opened this issue ยท 20 comments

commented

Issue type:

  • ๐ŸŒ Performance issue

Short description:

Notable lag for entities and eating because of 10 exporters with list filters.

Possibly related bug with stronger effect:
#1344

Steps to reproduce the problem:

Here is a video.

Pay attention to movements of minecarts, bees and unexpectedly long eating animation.

https://www.dropbox.com/scl/fi/3uxhua263qa0aes4tlmy7/Minecraft-NeoForge_-1.21.1-Singleplayer-2025-02-12-23-55-36.mp4?rlkey=ojbq4dni2fr9c85yag7lh0y29&st=7os7t5pb&dl=0

Important details:
250,000 items in the storage (in the 6 colossal chests with size 4x4x4)
10 exporters with List filter, every list contains only 2-3 items.


Versions:

  • This mod: integrateddynamics-1.21.1-neoforge-1.25.4-1079.jar
  • Minecraft: 1.21.1
  • Forge: NeoForge 21.1.95

Profiler output:

Cannot use Spark because it's not updated for NeoForge 1.21.1.

commented

Thanks for reporting!

commented

Could you maybe see if you can reproduce this in 1.20.1 too? I think spark does support that version already, and I don't think this issue has in any way changed since. In fact I think I've experienced this too in much earlier versions as well a long time ago.

commented

I found spark-neo version on modrinth, will try it.

commented

Here is it

https://spark.lucko.me/QFUbFtCNPk

Looks like the problem is combination of exporters and hoppers?

spark is a performance profiler for Minecraft clients, servers, and proxies.
commented

Image

commented

FYI, currently all hoppers are empty but still generate a lag.

Also, I replaced hoppers+exporters with List filters to bigger number of hoppers+exporters with single-item filters and lags become even worse. Then I replaced row or hoppers with row of barrels with item interfaces and lags are gone. So looks like this issue is not list-specific, but hopper-specific.

commented

Could you disable passive interaction on the exporters attached to hoppers?
That should fix the lag.

Maybe I should set passive interaction to false by default in the next major version, as I've received multiple performance reports like this one...

commented

Could you disable passive interaction on the exporters attached to hoppers? That should fix the lag.

No, this doesn't help:

https://spark.lucko.me/LsDmAfrtY8

Only replacement hoppers to barrels helps.

spark is a performance profiler for Minecraft clients, servers, and proxies.
commented

@uhloin Does that also mean that disabling passive interaction on the exporters does not behave as expected for you? Are hoppers still able to extract something via the exporters when passive interaction on those exporter is false? Because that would definitely be a bug.

commented

I cannot see any difference with those modes for export to hopper. And for import from hopper passive/non-passive interaction checkbox doesn't make any visible difference. Just checked this scheme:

Image

commented

@Jack-McKalling if you find some time, could you check if (disabled) passive interaction is also broken for you?

commented

I've tested this setup, where the left has passive interaction disabled, the right has it enabled (which started a moment later).
The difference seems to be that the left side hopper is blinking between 63 and 64 stacksize in its left-most slot, while the right one is always constantly full. Am I correct to assume this means passive interaction (as in this setup) works normally?

Image

commented

@Jack-McKalling I suspect it's working fine then.

@uhloin I think you may be misconfiguring things. When you are available, could you hop into our Discord channel? There are many smart people there that could help you figure out what is going wrong, much more easily than via this GitHub thread.
I'm leaving this issue open in the meantime.

commented

OK, but the lag itself is "wrong" thing in any case regardless of configuration :) Currently for myself I solved issue by barrels and single annoying thing rest is autocrafting deadlocks.

commented

@uhloin Have you had a chance to get in touch with one of the ID-experts in our Discord channel to see if passive interaction is working correctly in your case?

commented

Sorry, but if difference is just small timing like in experiment of @Jack-McKalling, it probably is the same for me. The problem is the lag.

commented

@uhloin The question we first need to answer is if passive interaction is broken for you or not. Only then can we take next steps. Otherwise I don't know where to look for performance improvements.

commented

I repeated test above. There is no difference between enabled/disabled interaction,
In both cases I have a pair seconds when hopper has 1 item and later hopper instantly becomes full (64x5) without any "blinking".
Speed of filling of bottom chest is the same: 1 item per sec.

Image

commented

Passive interaction changes were not applied immediately apparently. Will be fixed in next release.

commented

For reference, starting from MC 1.21.4, Integrated Tunnels will set Passive IO to false for newly placed parts.