Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Massive lag with BotanyPots #285

Closed
Wyrrrd opened this issue Jan 21, 2024 · 8 comments
Closed

Massive lag with BotanyPots #285

Wyrrrd opened this issue Jan 21, 2024 · 8 comments

Comments

@Wyrrrd
Copy link

Wyrrrd commented Jan 21, 2024

Issue type:

  • 🐌 Performance issue

Short description:

Pumping out a hopper botany pot from BotanyPots with an item importer from the bottom adds massive lag to the server. Just 10 of those were enough to make my average setup unplayable.

(I am unsure if the error lies in this mod, since I am having no experience in modding. If not, kindly point me to the offender.)

Steps to reproduce the problem:

  1. Put an item importer pointing at the bottom of a hopper botany pot.
  2. Add plant and soil to the pot.
  3. Add a boolean "true" variable card to the importer.

Versions:

  • This mod: 1.8.24
  • IntegratedDynamics: 1.20.4
  • BotanyPots: 13.0.18
  • Minecraft: 1.20.1
  • Forge: 47.2.19

Profiler output:

Will add if needed.

@rubensworks
Copy link
Member

Thanks for reporting!

@rubensworks
Copy link
Member

Could you share a spark profiling log? That will allow us to identify where the source of the problem lies.

@Wyrrrd
Copy link
Author

Wyrrrd commented Jan 22, 2024

I could not recover the issue to its full extent (might have something to do with the amount of items in the botany pots), but it is still noticeable in the server console skipping ticks if connected to the main system.

@rubensworks
Copy link
Member

@Wyrrrd Do you have a link at hand for this Spark profile? (usually people just share a link with me to a webpage)

@Wyrrrd
Copy link
Author

Wyrrrd commented Jan 23, 2024

I was unsure how long this link is valid and couldn't upload the file, but here you go: https://spark.lucko.me/9zHWQcRlcE

@rubensworks
Copy link
Member

Thanks!

Until this is fixed, you may be able to disable passive interaction in the part settings of the item importer, since botany pots seem to try to push to the network on their own (which is the cause of the lag).

Note to self: a slotless item handler should be used here.

Screenshot 2024-01-23 at 20 04 52

@Wyrrrd
Copy link
Author

Wyrrrd commented Jan 24, 2024

I am fine, piping the hopper botany pot output through another inventory works, too.

Using the hopper pot in this constellation was laziness on my part to switch to the normal pot. (Which doesn't work as well, due to the normal pot having no output inventory slots.)

@rubensworks
Copy link
Member

I just looked into this, and it's something I can not optimize unfortunately.

Botany pots make use of the slot-based item handler interface, which makes IT expose all slots in the network.
Botany pots will therefore iterate across all slots in the network, which can produce lag for large network.
But the ability to have access to all slots in the network is definitely desirable for many cases, so I'd prefer to keep it.

The only workaround is to disable passive interaction in the part settings of the item importer, or Botany pots could make use of the slotless item handler capability of common capabilities.

@rubensworks rubensworks closed this as not planned Won't fix, can't repro, duplicate, stale Feb 5, 2024
@rubensworks rubensworks moved this to Done in Maintenance Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants