Extreme framerate issues with The One Probe and Carry On
Shadowex3 opened this issue ยท 7 comments
Looking at summons like the whirlisprig with The One Probe will cause an extreme drop in FPS, from 100+ down to <30, and using Carry On to actually pick one of them up will turn the game into a literal slideshow with single digit framerates.
Appears to be related to the whirlisprig using the event bus to listen to tree growth, and it is registering itself and failing when these client mods recreate the mob on the client only.
Is this FPS cost only when looking directly at them, or does your FPS tank when they are just in the corner but not rendered by The One Probe?
I was one version behind on forge for 1.18.2. The latest version seems to have a slightly less severe reaction but that could be because I was testing in a different location instead of the middle of my farm. The debug piechart showed that looking at summons, and especially picking them up, caused the Tick section to start growing and quickly taking over the chart. Following that lead I ran Spark's profiler and got these results.
For The One Probe it looks like net.minecraftforge.client.gui.forgeingamegui.render()
down to mcjty.theoneprobe.rendering.overlayrenderer.renderhud()
is the root of the issues with looking at summons. It goes down to java exceptions about "nosuchmethod" and "reflectiveoperationexception".
For Carry On the hangup is under nm.client.minecraft.tick()
and looks like there's some kind of error happening because all the way at the bottom there's the same java exceptions about nosuchmethod
and reflectiveoperationexception
.
What stands out to me is that in both cases nm.world.entity.entitytype.create()
shows up followed by Ars Nouveau's calls, a sequence of of calls prefaced with java.util.stream.referencepipeline
and abstractpipeline
that repeats itself once or twice, and then the java exceptions I mentioned.
I'm not a Java guy but I want to guess that there's some kind of leak or loop happening. As if Ars Nouveau were responding to That One Probe and Carry On by thinking it needed to actually create new entities, being unable to properly do that, and then things going sideways from there.
I don't know if this would keep getting worse until something bad happens like a crash, corruption, or just the save file getting massively inflated in filesize. It doesn't look like there's anything permanent going on, debug output showed the usual cycle of minecraft's ram usage climbing in percentage and then it dropping back down again (garbage collection I assume), but if I were going to test this I'd definitely make a clean multimc instance to do it.
Try this version, I added a check to only register the events on the server: https://www.curseforge.com/minecraft/mc-mods/ars-nouveau/files/3943669
Appears to be related to the whirlisprig using the event bus to listen to tree growth, and it is registering itself and failing when these client mods recreate the mob on the client only.
It's not just the Whirlisprig but afaik all summons, quite a number of versions ago I noticed the same effect with a wixie and her cauldron too.
Is this FPS cost only when looking directly at them, or does your FPS tank when they are just in the corner but not rendered by The One Probe?
It's specifically having them rendered in The One Probe that causes it by looking at them, or picking them up using the Carry On pick-thing-up feature.
General lag related to the summons or wilden is likely related to Geckolib, it has a bit more overhead than normal minecraft rendering. However, I believe that is either limited to certain types of hardware, or low spec machines. Unfortunately that is out of my control. For the specific cases like this, there is definitely something unexpected happening. Let me know if that version fixes the error issues you are having.
A side note, latest version of geckolib may have fixed some issues with carryon, I know for a while there was a crash in 1.19 because of it, but that was for any geckolib mob in general.
I don't mean they're laggy in general, I meant this specific interaction with The One Probe causing a slideshow when rendering them in miniature in its little hud box happens with more than just the Whirlisprig. I've got a 5600X and 6800XT, and with AMD finally getting it together for openGL performance in their most recent drivers I'm getting 100+ FPS under normal circumstances.
About the only time I drop down below 75 even is when I'm loading a ton of chunks or looking at way too many Storage Drawers. It's definitely not a performance issue.