Applied Energistics 2

Applied Energistics 2

137M Downloads

Huge lag when calculating big recipes

official-Cromatin opened this issue ยท 5 comments

commented

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

commented

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.

commented

image

I don't have that recipe??

commented

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

commented

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

commented

Should be mitigated sufficiently by #6514.