Client-side memory leaks in 1.12 #324
Replies: 6 comments 2 replies
-
Other memory leaks that recently got fixes by RLMixins that can be added to UT as well as I'm still not sure if it's compatible with MixinBooter 8:
|
Beta Was this translation helpful? Give feedback.
-
Highly doubt that mixins for Scala imports would be easy, so I included them in separate forks. |
Beta Was this translation helpful? Give feedback.
-
I think there may be a way to properly cleanup the maps using packets, so I'll look into it while looking into SimplyJetpacks. |
Beta Was this translation helpful? Give feedback.
-
Other approaches might be possible, yes. But don‘t want to mess with Scala more than needed! |
Beta Was this translation helpful? Give feedback.
-
Added fix for TARDIS and Simply Jetpacks in above PR. It would indeed require messing with a lot more files in Scala with MrTJPCore and CBMultipart and their dependents, so looks like the forks are the way to go. |
Beta Was this translation helpful? Give feedback.
-
Maybe we could add this to the list as well? |
Beta Was this translation helpful? Give feedback.
-
EDIT: I'll update this list as I find more.
I've been doing some memory profiling on my client on a large modpack, and I figured I would list some mods in 1.12 that seem to be causing memory leaks by holding onto
WorldClient
and/orEntityPlayerSP
, noticeable when changing dimensions or reconnecting (as that creates a new client/player):journeymap.client.task.multi.RenderSpec,
I don't have much to back this up though besides what JProfiler saysVersionCheck
EDIT:
SyncHandler
maps client side - Server side, these maps are cleaned up properly here and here, but client side also updates these maps and those events are never called client-side, so the client-side maps are never cleaned up.ByteBufInputStream
of the data, but not releasing the actual data.PacketCustom
due to not releasing its data.WorldClient
each on first time rendering crystal chest or crystal shulker box due to using a reusableEntityItem
WorldClient
for each obelisk renderer due to using a reusableEntityItem
The first 3 (bolded) were the most consistent in holding the WorldClient, and although Tardis should be easy enough to fix (by just disabling adding to the map), I have tried a few ways to fix CB Multipart and MrTJPCore, but they are in Scala, so even if a simple fix is to use a WeakHashMap, I don't know how to apply it externally.
Some screenshots from a heap dump:
Beta Was this translation helpful? Give feedback.
All reactions