Skip to content

Memory consideration #1412

@Vrganj

Description

@Vrganj

Is your feature request related to a problem? Please describe.
MapPalette uses a java.util.HashMap with an Integer value.
GrimAC likes keeping millions of instances loaded.

Describe the solution you'd like
As the comment above the field states,

// TODO: Can we use fastutils here?
private final HashMap<Object, Integer> stateToId = new HashMap<>();

FastUtil would work fine here, basically any implementation of an Object2IntMap.

Describe alternatives you've considered to solve your solution without
us adding this as a feature?

It's a simple change I would've submitted a pull request for if it weren't for the 5 different platforms I'd have to test and worry about shading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions