Create

Create

86M Downloads

Create loads JEI recipes slowly

mezz opened this issue ยท 4 comments

commented

Describe the Bug

I am profiling a large mod pack (ATM 7) and I found that Create takes a long time to register JEI recipes, about 14 seconds on my laptop.
Most other JEI plugins in the pack load recipes in under 100 milliseconds.

The most time is spent in:

(4.7 seconds) CreateJEI.java:139
com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity.canCompress(Recipe)

(1.5 seconds) CreateJEI.java:283
com.simibubi.create.content.contraptions.fluids.recipe.PotionMixingRecipeManager.getAllBrewingRecipes()

(1.2 seconds) CreateJEI.java:116
com.simibubi.create.compat.jei.category.BlockCuttingCategory$CondensedBlockCuttingRecipe.condenseRecipes(List)

(327 ms) CreateJEI.java:269
com.simibubi.create.compat.jei.CreateJEI.findRecipes(Predicate)

Reproduction Steps

  1. Download and run https://www.curseforge.com/minecraft/modpacks/all-the-mods-7
  2. Open a world and run a java profiler on Minecraft to instrument JEI's startup time.
  3. Notice the time spent by the Create mod during JEI's startup when building the recipe registry.

Expected Result

Create can probably optimize its JEI startup time by optimizing the methods that are running slowly.
On the other hand, it is possible that it actually just need to do a ton of work and is much much larger than all the other mods.

Screenshots and Videos

No response

Crash Report or Log

No response

Operating System

macOS 12.1

Mod Version

0.4.0c

Minecraft Version

1.18.1

Forge Version

39.0.43

Other Mods

all the mods in https://www.curseforge.com/minecraft/modpacks/all-the-mods-7

Additional Context

No response

commented

This issue has been marked as stale because it has been inactive for 3 weeks. It will be closed if it remains inactive for another 3 weeks.

commented

I opened a small PR to help the biggest part of this here: #2846

commented

The second and fourth points should have been addressed in the recent commit 2211632.

commented

Nice work, thanks!