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.
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 aHashMap<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.