-
Bug
-
Resolution: Fixed
-
1.17.1, 1.18.1, 22w06a, 1.18.2, 22w11a, 22w12a, 22w16b, 22w19a, 1.19 Pre-release 4, 1.19, 22w24a, 1.19.2, 1.19.3 Pre-release 2, 1.19.3, 23w04a, 23w05a, 23w06a, 1.19.4 Pre-release 1, 1.19.4, 23w16a, 23w18a, 1.20.1, 23w31a, 1.20.2, 23w44a, 1.21.1
-
Confirmed
-
Performance
The game experiences a large frame rate decrease when there's a large amount of HUD/hotbar elements displayed on the screen, in this case hearts. I assume this is also the case with other elements like the hunger, armor, and oxygen icons, but only noticeable with hearts due to the use of certain effects (health boost & absorption) at high amplifiers, as well as with the use of the max_health attribute. Fairly small example:
As can be seen in the images the performance hit is somewhat high just for a few more hearts added to the screen. Apparently each element (heart/hunger/defense icon) is counted as a draw call, and this number can increment in certain survival scenarios, making rendering of a simple status bar resource intensive. Even more intensive if items are rendered on the slots (MC-233604).
I considered this a different issue from MC-10755 for two reasons:
- There aren't any uninteded effects at high amplifiers gameplay-wise, and can be reproduced with the max_health attribute, not only effects.
- This is a performance concern with something as simple as the HUD, which as i said before can be reproduced in a survival setting.
While this issue might not be very noticeable in vanilla at first hand, some servers and datapacks make use of high health effects, making this issue very apparent. Here you can see the worst case scenario to demonstrate how it can impact frame rate times:
You can only imagine how many draw calls are being made here to end up with these frame times in a void world. You can also check the attachments for more examples. Word from some modders say that this can be mitigated by applying batching when rendering the status bar.
How to reproduce
- Create a void world, and run either one or both of the next commands.
/effect give @s minecraft:absorption 100 255 true
/attribute @s minecraft:generic.max_health base set 1000
- Press ALT+F3 and notice the lag on the FPS graph.
- is duplicated by
-
MC-231504 Performance issues with the GUI
- Resolved
-
MC-253192 Slow rendering of hotbar
- Resolved
-
MC-253193 Slow rendering of status bar
- Resolved
-
MC-254150 Having HUD on diminishes FPS
- Resolved
- relates to
-
MC-233604 GUI / Item rendering can heavily impact frame rate performance
- Open
-
MC-249635 Text rendering can heavily impact frame rate performance
- Open