You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(relay up the fork network if applicable)
For certain items (like shulkers), isEqual check is VERY expensive, and this code uses it like it's the cheapest thing in the world.
// Failed to shift-click items, try a manual method
Reproduction:
Have ~20 shulker boxes of pistons in your inventory
Open a double chest with ~40 of the same boxes in it
Try to alt scroll (possibly multiple times at once by accident) and observe extreme lag and possibly a crash.
Suggestion:
For starters you could just check that the reference item is unstackable, so there is no point in many of those checks. Futher, you could check that the destination slot is full to skip[checks. Shift click checks and manual move checks are so expensive with shulkers that I can literally see them being performed at ~50/second, so it is a bad idea to do them if something easier can fail earlier.
The text was updated successfully, but these errors were encountered:
(relay up the fork network if applicable)
For certain items (like shulkers), isEqual check is VERY expensive, and this code uses it like it's the cheapest thing in the world.
itemscroller-crafting-fix/src/main/java/fi/dy/masa/itemscroller/util/InventoryUtils.java
Line 911 in 2b02a63
Reproduction:
Suggestion:
For starters you could just check that the reference item is unstackable, so there is no point in many of those checks. Futher, you could check that the destination slot is full to skip[checks. Shift click checks and manual move checks are so expensive with shulkers that I can literally see them being performed at ~50/second, so it is a bad idea to do them if something easier can fail earlier.
The text was updated successfully, but these errors were encountered: