Immersive Posts

Immersive Posts

15M Downloads

[1.18.2][BUG] Memory Issues

MissPotato opened this issue ยท 3 comments

commented

Is there an existing issue for this?

  • Yes, i have searched for already existing issues.

Are you using the most recent version of X?

  • Yes, i am using the most recent version.
  • Yes, it still happens in the most recent version.

Minecraft Version

1.18.2

Forge Version

40.1.48

Immersive Engineering Version

1.18.2-8.0.1-147

Related Mods and their Versions

Nothing specific, though the more blockstates there are the worse it gets

Current Behaviour

Memory leak related to blockstates

Expected Behaviour

No memory leak?

Reproduction Steps

Have mod installed
leak Memory

Logs

https://mclo.gs/FOzx4HD

Additional Informations

With mod at main menu: https://i.imgur.com/6SBVjmA.png
Without mod at main menu: https://i.imgur.com/Q0JS0kq.png

If you've never seen VisualVM before the dips are GC.

I can provide a heapdump, but given the nature of heap dumps it would be quite large and finding a place to upload would not be easy.

  • Add a thumbs-up to the bug report if you are also affected. This helps show the severity of this bug report and doesn't clutter the comments.
  • Add a comment if you have any insights or background information that isn't already part of the conversation.
commented

Closing as it might have been a red-herring. Will re-open if need be.

commented

Preface:
After a lot of further testing here is a better data. After booting the game, I click to go to the settings. This is to try and create as consistent a test a I can. After minecraft finishes warming up, (the spikes go away in heap) I force a GC using Visual VM. This forces a fullscale garbage sweep. I would then run for over a minute idle to collect data on passive garbage collection. This test was done 5 times for each environment.

Data:

Only Immersive Engineering installed, the heap space is around 395 mbs In all these tests it had around a 216mb garbage per minute gain https://i.imgur.com/dDDwaf4.png https://i.imgur.com/UtqFp9g.png https://i.imgur.com/IVRNbmd.png https://i.imgur.com/kAUSz6w.png

Adding just Immersive Posts, the heap jumps to around 1.05 gbs. In all of these tests it had around a 218mb garbage per minute gain. https://i.imgur.com/vR6Tn5g.png, https://i.imgur.com/qL1Itiw.png, https://i.imgur.com/hv1vJqQ.png, https://i.imgur.com/4IgYtbs.png, https://i.imgur.com/fCzors0.png

Heap Dump for Immersive Enginneering: https://i.imgur.com/CHPyUlm.png

Heap Dump for Immersive Engineering + Posts: https://i.imgur.com/50zXkwk.png

Conclusion
The additional garbage is insignificant to the point that it could probably be written off as margin of error: but the heap is very large. Looking at the summary of the heatdump something pops out. "net.minecraft.client.renderer.block.model.multipart" appears and is now taking up 12.8% of instances Java.lang.object array goes from 618 thousand instances to 4.3 milion instances.

Aside
The graphs dynamically change size, so that is why some imagines appear worse than others, but the raw numbers are same, margin of error aside. I also wanna say I really like the models of this mod, and I hope this doesn't feel like I'm shitting on you or anything. I appreciate that you've made this mod, and that's why I'm reaching out.

commented

I'm also experiencing memory issues with this installed. It's causing a lot of lag on the client due from the GC