Skip to content

Wardrobe menu severely affects fps #106

Open

Description

@ninjaguardian

It seems to be all the player model rendering. I drop all the way down to 30fps.

How I came to this conclusion

I removed this bit:

val entityDisplay = Displays.entity(
    DisplayEntityPlayer(CompletableFuture.completedFuture(McPlayer.skin), armor, pageNumber != currentPage),
    displayWidth, displayHeight,
    (displayWidth / 2.0).toInt(),
    context.mouseX.toFloat() - context.x, context.mouseY.toFloat() - context.y,
)

if (WardrobeConfig.textured) {
    entityDisplay.render(graphics, context.x, context.y)
} else {
    ExtraDisplays.background(
        when {
            hovered -> BACKGROUND_COLOR_HOVERED
            else -> BACKGROUND_COLOR
        },
        BACKGROUND_RADIUS,
        when {
            hovered -> HOVER_COLOR
            id == WardrobeAPI.currentSlot -> SELECTED_COLOR
            else -> 0x0u
        },
        entityDisplay,
    ).render(graphics, context.x, context.y)
}

and it ran better.

This likely means that the player model rendering is the problem, though it could be some intermediate step.

Could there be ways to optimize this?

Activity

  1. added theissue type on May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions