-
Bug
-
Resolution: Unresolved
-
None
-
1.21.1, 1.21.2 Release Candidate 1, 1.21.4 Pre-Release 1
-
None
-
Confirmed
-
Performance
Relates to MC-253502 and MC-277520.
The bug
"Obfuscated" text will cause the affected letters to switch to another random character every tick. This has the very undesirable side effect of cluttering the internal font atlases, which causes the game to take up a lot more memory than it needs to.
How to reproduce
- Run this command five times:
/tellraw @p {"text": "ⓝiltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltfn~∅iltf", "obfuscated": true}
- Press t so that you can see the chat history
- Leave the game running for as long as you like
- Press F3 and S
Expected results
Nothing special.
Actual results
The game freezes for considerably longer after pressing F3 and S. Checking the screenshots/debug folder will reveal that there are now several hundred files produced for the font atlas.
How to fix
For the "default" font, we could perhaps limit the valid characters shown in obfuscated text to those which are not in GNU Unifont (MC-134879). This would avert this problem for the vast majority of cases where obfuscated text is actually seen in-game.
The issue would still remain if the font is set to "uniform" manually, so perhaps some system to get rid of old font characters or old, disused atlas files could also be implemented.
Further notes
I've attached a zip file of the results of leaving the game to run for 30 minutes. This barely comes under the 10MB limit.
- relates to
-
MC-253502 Obfuscated text has a significant impact on performance
- Open