Theurgy

Theurgy

15M Downloads

Fermentation Vat causing very high μs/t

Pilpoh opened this issue · 9 comments

commented

Describe the bug
If the Fermentation Vat contains an Oak Log and a Alcemical Sulfur [Dragon Egg] with Water, the μs/t goes all the way up to 4-6000. While playing on a server this basically means I can not use the Fermentation Vat.

To Reproduce
Steps to reproduce the behavior:

  1. Place Fermentation Vat
  2. Add an Oak Log and a Alcemical Sulfur [Dragon Egg] with 1 bucket of Water
  3. Run observable
  4. 2024-11-22_10 51 56
  5. As you can see the μs/t

Expected behavior
Less μs/t when using the Fermentation Vat.

Screenshots
2024-11-22_10 51 56

System (please complete the following information):

  • Theurgy Version: theurgy-1.21.1-neoforge-1.58.1.jar
  • OS: Windows
  • Minecraft Version: 1.21.1
  • Modpack Link and Version, or list of mods: All The Mods 10

Additional context
Love the mod, want to use it more, can't if this keeps happening :(

commented

@Mowmaster is it possible to get a spark report?
That would point us to where it is happening.

I am sure you are right with the recipe check, there were some modifications a few weeks ago to make the recipe checks more player friendly (mainly, to enable future debug information about missing ingredients and such) that may have had that unintended side effect

commented

Provide a Spark report?

commented

can confirm this occurs in an ATM10 server im currently playing on,
if a recipe is present in the fermentation container the tps tanks, if one ingredient is in but the other isnt the tps is fine, its almost as if the recipe is being checked per tick and not on container 'close'
Ill do some code digging to see if i can find something
(not an admin so i cant run a profiler)

commented

sorry for the delay, took a while before i found myself online with an admin at the same time
image

commented

Ran observable in my ATM10 with filled fermentation with and without Plolymorph mods.

I can confirm the μs/t drops down to ~60 μs/t without polymorph.

I couldn't find a way to configure polymorph to ignore theurgy machines. I think I'll just remove polymorph from my server for now.

@klikli-dev, if you point me in the right direction with different possible caching strategies to look into (or any direction really) I could try to investigate a fix.

commented

The next theurgy version adds caching for the situation embeddedt uncovered.
For non-automated vats that likely changes nothing (as the check only happens when players try to close the vat), but for redstone activated ones it might reduce recipe checks.

It may or may not fix the polymorph induced issue. I am closing this issue for now to continue the solution discussions in illusivesoulworks/polymorph#298

If there is a way for theurgy to notify polymorph that it wants to be excluded I will add that, but I need feedback from the creator if that possibility exists.

commented

@sharpTrick Thanks - I will first open an issue with polymorph if we can somehow exclude theurgy, and if the issue persists after we'll look into custom recipe caching instead of using vanilla MC!

commented

Code analysis suggests there may also be an issue without Polymorph - if a recipe does not exist for the fermentation vat's current inputs, the "lack of existence" is not cached (example), which means the vat will be forced to check all the recipes again on every tick.

commented

oh that is a very good find. I have to figure out if I can do that cleanly in the cached check or if I need to do that one level higher in the crafting behaviour