Dungeons Gear

Dungeons Gear

6M Downloads

[1.18.2] Low FPS issues (maybe GUI related)

MarioSMB opened this issue ยท 7 comments

commented

I've noticed a signficant FPS drop when using the mod, and I suspect it's related to the new GUI elements; having the mod installed drops my frames a bit, the more artifacts slotted the lower my framerate, the soul bar may be adding to the lag a bit.

commented

This has been reported by someone else. I am still looking for solutions, but apparently this is Minecraft's rendering code that is gobbling up some resources. We reduced the amount of things to render in recent versions to reduce the impact (went from 17% to 11% of the rendering cycle). But we had to lose some stuff, like black border around the text.

I am still running tests, as my impression is that other mods adding GUI elements should have the same issue.

commented

So... I've been playing around with this a bit, and it looks like there's only a small FPS drop with the GUIs rendered, but the moment you slot any artifacts the framerate starts to take a heavy dip (with up to 70 FPS lost when all 3 are slotted). Putting artifacts in the inventory hotbar so they're still rendered on screen doesn't cause this dip in frames, so there must be something wrong with the rendering of Curios on screen, presumably.
I have a sneaking suspicion this is related to the keybind text rendering underneath the items - something is misbehaving here!

commented

Another fun tidbit: with isHidden set to true on both the GUI elements, I'm still getting a massive framerate drop with 3 artifacts slotted!

commented

Here's a Spark profile run with both GUIs hidden and 3 artifacts slotted, seeing a lot of render calls strangely: https://spark.lucko.me/V4CrFNlIoi
The functions it references don't even seem to exist in the source code, so I'm at a bit of a dead end here, hopefully this is useful to the team.

commented

image
Interestingly, the issue no longer exists on 1.19.2
https://spark.lucko.me/1ceuCvKWUs

I'm currently wondering in how far I want to still put effort in this :(

commented

If that's the case then it looks like the solution is a fairly simple one; a quick diff reveals RenderGuiOverlayEvent being used instead of RenderGameOverlayEvent in the 1.19 branch.
I'm not sure how well-maintained the 1.18 branch is moving forward, though backporting a fix for a major lag issue might be worth considering!

commented

1.18 is no longer supported.