Applied-Energistics-2 icon indicating copy to clipboard operation
Applied-Energistics-2 copied to clipboard

Huge lag when calculating big recipes

Open official-Cromatin opened this issue 2 years ago • 4 comments

Describe the bug

If you have a recipe that is very large and contains items that lose their durability with each crafting step, the calculation takes a long time.

In addition, the server tick needs longer than 60 seconds and the server is therefore terminated by the watchdog

How to reproduce the bug

  1. Start Minecraft with the following mods:

AE2 (11.1.3) ExNihilo Sequentia (1.18.2-20220620-173540)

  1. Build a Basic ME System

  2. Create a pattern as shown in the picture (As input a diamond hammer and vanilla endstone, as output crushed endstone) and put it in the pattern provider that is connected to a molecular assembler. Pattern

  3. Start a crafting job with 30,000 Crushed Endstone as the end product

  4. Check the server's console, you should get a warning that it's taking a tad too long. After 60 seconds the server will be terminated automatically

Expected behavior

The steps should calculate successfully and the server should not crash. In the best case, only minimal lags occur

Additional details

No response

Which minecraft version are you using?

1.18

On which mod loaders does it happen?

Forge

Crash log

https://gist.github.com/official-Cromatin/1f65d27319e3e0380222a149c7dcbea8

official-Cromatin avatar Jul 18 '22 12:07 official-Cromatin

image

I don't have that recipe??

Technici4n avatar Jul 23 '22 09:07 Technici4n

I tried crafting 30000 cable anchors (also a recipe with durability) and I was able to without a problem. The calculation takes a while but it's spread out over multiple ticks to avoid the issue that you are describing.

I suspect it could be a config issue. I would recommend that you check the config entry for craftingCalculationTimePerTick, it should be at 5 by default. You should also make sure that craftingSimulatedExtraction is set to false.

Technici4n avatar Jul 23 '22 09:07 Technici4n

My mistake, its an custom Recipe added through Craft Tweaker

craftingTable.addShapeless("dend", <item:exnihilosequentia:crushed_end_stone>, 
    [<item:exnihilosequentia:diamond_hammer>.anyDamage().transformDamage(1), <item:minecraft:end_stone>]
    );

I also Checked the Config and all the values there are the default ones

official-Cromatin avatar Jul 23 '22 17:07 official-Cromatin

Ok yeah I can reproduce with crafttweaker. I'll have to investigate to understand why it's so slow.

Technici4n avatar Jul 24 '22 10:07 Technici4n

Should be mitigated sufficiently by #6514.

Technici4n avatar Aug 28 '22 16:08 Technici4n