Skip to content

[Suggestion] Optimize Vault behaviour #10134

@katietheqt

Description

@katietheqt

Currently contraptions that pick up a lot of single item entities can get very laggy, since each item does an O(n) search through contraption storages to find an empty place to put it. I think a good solution to this would be changing storage behaviour for vaults to instead store a HashMap<ItemTypeWithComponents, Integer> (made up key type). This avoids the O(n) search since a lookup can be done for the item type and then the counter simply incremented. I'm happy to submit a PR implementing this if the team agrees it's a good idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions