Iron's Spells 'n Spellbooks

Iron's Spells 'n Spellbooks

18M Downloads

[Bug] Jei ArcaneAnvilRecipe hogging memory in a large modpack

ColdTearsYY opened this issue · 14 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.

commented

Yeah, this seems to be the problem. 3 months later and there seems to be no fix at all from the devs.
Using up to 25% of memory is not accetable.
Would be nice if there was a config option to completly disable the function to enchant weapons with scrolls.
For me the spellbooks are enough to use magic. I dont need weapons with magic spells. Yeah, would be nice to disable it.
(Or maybe an Whitelist or Blacklist option for specific mods to use this kind of feature.)

They are adding a recipe for the arcane anvil for every kind of scroll, for every lvl of this scroll (~700), for every possible weapon / armor.
If you just add Simply Swords (~160 Weapons) you would add ~112.000 anvil recipes.

And it get's worse for every update when they add another spell.

commented

3 months later and there seems to be no fix at all from the devs

Fix it yourself then. We have other things to do in life than play minecraft. We have a fix prepared in a branch but haven't gotten the time to test it yet.

commented

Hello, I didn't mean to sound rude. I appreciate all your work guys, thanks for this!
This mod is one of the best magic mods in my opinion.
I still have this mod installed and just deactivated JEI and use instead EMI. EMI does not have Anvil Recipe function without JEI.
If you guys have something in a branch and working on it, then this is a good message.
Family and Work goes first and after that comes the hobby.

commented

fixed in 3.2.1