Iron's Spells 'n Spellbooks

Iron's Spells 'n Spellbooks

10M Downloads

[Bug] Jei ArcaneAnvilRecipe hogging memory in a large modpack

ColdTearsYY opened this issue · 13 comments

commented

Observed behaviour

20240310232302
20240310232314
When there are many weapons could be used in arcane anvils to combine with scrolls, it lags when looking up in emi/jei to see the recipes in arcane anvil page. And it consumes a lot of memories.

Expected behaviour

jei/emi is used smoothly when looking up recipes.

Steps to reproduce

1.add jei, spellbooks and some mods to add weapons
2.open jei and choose "arcane anvil" page
3.stutter for a while and opened

Server Type

Dedicated Server

Crashlog

No response

Iron's Spells N Spellbooks version

1.20.1-3.0.1

Forge version

1.20.1-47.2.20

Other mods

No response

commented

I have found the potential cause of the memory leak in the "Arcane Anvil View Recipes", it usually sits on the last page:
memory leak

commented
commented

How does this memory usage compare to the normal anvil, which also creates a recipe for every weapon per enchantment type per level?

commented

other smithing recipes:
20240311103409
arcane anvil recipes:
20240311103438

Without spellbook mod memory usage range: from 3700 to 5500mb and gc
with mod: from 5900 to 7300mb and gc

commented

although not a leak, it is clearly hogging memory compared to other jei implementations. we'll look into why

commented

Download link: windmc.top:5244/mods.zip
This is my whole mods folder test above.
I have already removed emi mod and iron‘s spellbook mod due to the mentioned issue so you could download the file, add mods and test.
@lab3 thx a lot

commented

@ColdTearsYY I'm having trouble reproducing this. Do you have some examples of mods that when added create this issue?

commented

@lab3 Hello, did you had some time to look into the problem? I have a similar Observation.
Maybe Iron's spells 'n speelbooks together with apotheosis is blowing up the memory allocation?
hprof file is generated through spark.

only example to reproduce is the modpack im playing:
https://www.curseforge.com/minecraft/modpacks/sebastian24443-creation

really great mod by the way :)

grafik

commented

Having the same problem trying to add Iron's Spells in Prominence II Classic.

Is there any way to disable the JEI recipe for the Arcane Anvil?

commented

I know that you can manipulate recipes with KubeJS, but i didnt found anything about it on google to remove recipes from anvils.