Closed lcy0x1 closed 3 weeks ago
I don't know if it is related to this, but using this mod makes the ram utilization look like there is a memory leak. It goes at about 1GB/s of RAM or even more. (I went one by one enabling mods until I found out it was this one. I confirmed it by using Spark's profiler.)
Usually, I have RAM usage of around 100MB/s (so as to give a baseline).
If this is not related to this issue, then tell me if so and I will delete the comment and instead open another issue regarding the mod.
P.S. I am writing this regarding the 1.21 Fabric mod. Idk if the same occurs for Forge/NeoForge/other Modloaders. I assume this issue was written by someone using Forge since curios was mentioned instead of trinkets.
I don't know if it is related to this, but using this mod makes the ram utilization look like there is a memory leak.
This more deals with the performance of the most commonly used methods within accessory API and less with possible memory utilization problems though not entirely unrelated to.
A link to the spark profiling combined with a pack break down would be helpful.
I went through my browser history and got the Spark link for when I did the profiling before removing the mod: https://spark.lucko.me/lqx6xUhO0T
I used the mod view at the top to see which mod was contributing to the lag the most. With the mod view, it shows all mods that were being used at the time.
Hope this helps!
I've read the spark profile. From what I can gather the profile period is far too low to really signify anything besides possibly Endec being kinda slow when it comes to encoding. There's definitely no memory leak tho.
Oh. Is there a way to speed that up or something? It somehow makes it so that there is way more ram allocation somehow and it makes it extremely laggy. After removing it, the next new culprit is now Traveler's Backpack. .-. I'mma just assume now that it's just that my MacBook doesn't have enough RAM. It only has 8GB and 1536VRAM since it's integrated graphics. So, yeah. Not that much to work with in the 1st place. Thanks for the reply, though.
there isn't really any issue with ur pack. It's just the fact ur only giving it 4 gigs of ram. It's not a mod's fault it's just accessories happened to be doing the most things
@Luillo9642 There are too many entities in your world. Some commands are running on the entities. https://minecraft.wiki/w/Commands/debug should show you that It's not relating to specific mod I guess
An update contains an experimental method of caching lookup to optimize looking through accessories slots
This is a suggestion on API improvements based on observed performance issue of Curios in 1.20.1
Problem: Too many mods rely on
Optional<ItemStack> findFirst(Predicate<ItemStack> predicate)
for checking if a player or entity has certain items. This requires iteration over all slots and often cause lag.Solution: Have some better optimized methods for common use cases
Optional<ItemStack> findFirst(Item item)
Optional<ItemStack> findFirst(TagKey<Item> tag)
Optional<ItemStack> findFirst(NamedFilter filter)
:ResourceLocation
as id for caching purpose. The filter requirement should be static to make caching valid.NO_REPEAT
tag for items that can only have 1 worn on a player, so that mods don't need to do this check themselves. This should take effect across slot types, so that it works on items that can be placed in multiple slots