Skip to content

CastingImage#userData causes a lot of lag #1008

@Real-Luxof

Description

@Real-Luxof

Describe the feature

CastingImage#userData is a CompoundTag which means that anything and everything put into it is eagerly serialized and then has to be deserialized later when recalled. This makes hexes that put a lot of data in the Ravenmind extremely laggy (such as a simple veinminer hex), with the lag dropping like a rock if only the stack is used.

Using a custom implementation HashMap<String, Object> with a private put(String, Object) method and a public put(String, NbtElement) along with all the neat TagCompound methods instead of an actual TagCompound would solve both the issue of "everything must be serializable" and the issue of the lag.

Additional context

For addons that would want to store weird data types anyway, a TagSerializable interface that can also go right in might be nice to have.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions