Cyclic icon indicating copy to clipboard operation
Cyclic copied to clipboard

Cyclic Crafter Lag Caused By TileCrafter.findMatchingRecipe()

Open 7ekhed opened this issue 3 years ago • 2 comments

Minecraft Version: 1.19.2

Forge Version: Universal (However, I am using 1.19.2-13.1.52)

Mod Version: 1.19.2-1.7.14

Single Player or Server: Server

Describe problem (what you were doing; what happened; what should have happened):

Cyclic is causing tremendous TPS lag on my servers because of the autocrafters.

I think this could be solved by having a button to lock the current crafting recipe so it doesn't have to findMatchingRecipe() every time it goes to craft, and instead would only have locked-in crafting recipe.

I hope my 'solution' can help, and I hope this helps improve cyclic in just another way :)

(Screenshot shows Cyclic takes up 32.4% of my servers TPS, 16.91ms, 15.13 of which are just finding the crafting recipe) cycliclag

7ekhed avatar Nov 17 '22 20:11 7ekhed

Side note, slowly started getting more and more noticeable server lag as I placed more of these. Roughly 30 of them in a Compact machine, with refined storage exporting into them, and when done crafting, importing back into refined storage.

I have 19 maximum size compact machines growing as many crops as possible each, and it still is not nearly as impactful to TPS lag as just the crafters are.

I believe that the crafting recipe lock will fix this issue, and other peoples issues with crafter lag, too :)

7ekhed avatar Nov 17 '22 20:11 7ekhed

@Gegy Your code seems to fix the issue. Could you please open a pull request for the fixes. (And sorry for the ping)

Herobone avatar Apr 29 '25 15:04 Herobone