mojira.dev
MC-129556

GUI logic is included in "root.tick.textures"

The root.tick.textures textures profiler section is not ended until the "mouse" section starts. But in between, there is a lot of GUI logic (for example, this.currentScreen.handleInput(), this.currentScreen.updateScreen()), so if a GUI is lagging, it would show up as root.tick.textures rather than root.tick.gui:

In Minecraft.runTick:

this.mcProfiler.endStartSection("textures");

if (this.world != null)
{
 this.renderEngine.tick();
}

// Section should end here

if (this.currentScreen == null && this.player != null)
{
 if (this.player.getHealth() <= 0.0F && !(this.currentScreen instanceof GuiGameOver))
 {
 this.displayGuiScreen((GuiScreen)null);
 }
// ... much more GUI logic

 

Screenshot (after spamming the esc key to open and close the ingame menu) showing the importance of this ("gui (part 2)" is what was being included in "textures"):

 

Attachments

Comments 2

are you saying that code is in vanilla to begin with why would removing this which shouldn't execute unless the player is dead fix anything? Or are you saying something else your really unclear here

Looking through the source code of the latest versions, I cannot find the section addressed in the issue anymore. Can you still verify this? If so, please update the report to include the most up to date code analysis.

Runemoro

(Unassigned)

Confirmed

Performance

Minecraft 1.12.2, Minecraft 18w19b, Minecraft 1.13, Minecraft 18w30a, Minecraft 18w31a, 1.14.4, 1.15 Pre-release 6, 1.15.2, 20w10a, 1.16.2

Retrieved