[BUG] Pouch of Unknown causing large lag when picking up Items
anabsolutesloth opened this issue ยท 5 comments
Mod Version/Modlist
MC 1.12.2
Modlist: that of Greedycraft 1.35.118.1, minus Performant and DynView, and with Spark.
Pouch of Unknown 1.9
Environment: Singleplayer
During a Guardian of Gaia II bossfight, i was having large, persistent lag throughout most of the fight, it got especially bad when it began spawning mobs, i ran some Spark reports and it seems to be related to Pouch of Unknown.
My CPU is on the low end for sure (~2010-2014), but this should not have this intense of an impact.
Spark Reports:
Report 1: https://spark.lucko.me/uYsymNm0t4 120s profile duration
Report 2: https://spark.lucko.me/p2whUi1Y6l 15s profile duration
Report 3:https://spark.lucko.me/wgK2RcBv9r 15s profile duration
Baseline report from multiple minutes before the fight: https://spark.lucko.me/zwnU5EMgaT 300s profile duration
This issue appeared also on a server running the same world.
Small update, this also began to occur when exploring, i looked at the spark report deeper, and it seems to root back to these two functions in your codebase:
https://github.com/TCreopargh/PouchOfUnknown/blob/master/src/main/java/xyz/tcreopargh/pouchofunknown/PouchOfUnknownEvents.java
https://github.com/TCreopargh/PouchOfUnknown/blob/master/src/main/java/xyz/tcreopargh/pouchofunknown/PlayerInventoryListener.java
Well, i appear to have solved it by emptying out my Backpack from my Baubles, it was carrying a lot of stuff, and 3 Tinkers' tools.
I'll leave this open for now.
Alright, so this code scans your ENTIRE inventory whenever you pick up something? I get it's supposed to be anticheat, but there's a point where you should not sacrifice performance for that, this is Modded Minecraft, there's gonna be broken shit.
Yeah it scans your entire inventory whenever you pick up something but some other mods might add things to your inventory without calling the pick up event, which will make things unable to be put into the pouch automatically. Currently I don't really have time to work on this, sorry