Don't attempt to insert items to full inventories to save on performance#1251
Open
Swedz wants to merge 2 commits intoAztechMC:1.21.xfrom
Open
Don't attempt to insert items to full inventories to save on performance#1251Swedz wants to merge 2 commits intoAztechMC:1.21.xfrom
Swedz wants to merge 2 commits intoAztechMC:1.21.xfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Machines that auto extract to full inventories (such as a barrel) can take a high amount of µs/t. This can be reproduced by simply placing an electric furnace with auto eject into an iron barrel. The barrel should be filled with the output of the recipe running in the furnace, and the furnace should be run until the output is full. This results in the machine, every tick, trying to push the output into the barrel and failing. I recommend using Observable to see this per-block entity.
This PR prevents unnecessary insert attempts when the target inventory is full. This is implemented for
SlotItemHandlerandMIItemStorage$ItemHandler- which should cover all MI machines, hatches, and barrels. So it is worth noting that this improvement only applies toItemHandlers that implementFilledItemStorage.Profile reports courtesy of PupleDino on discord:
Spark Report (Before)

Spark Report (After)
