Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FakePlayerHelper has poor performance #101

@katietheqt

Description

@katietheqt

Describe the bug
The FakePlayerHelper class almost always attempts a class load using Class.forName, as failed class loads return null which computeIfAbsent ignores. The only case where a class load is not attempted is if you are on fabric and the player is in fact a fakeplayer.

Expected behavior
I would expect the null variant to be cached. This should probably just use two static final fields anyway.

Mod and Minecraft version:
Issue is present in current tree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions