I recently did some tests when I was studying the problem of too high MSPT occupancy of the hopper. I used the hook function method to test the execution time of some hopper-related functions.
After observing the test results, I annotated a function called Hopper::_isFullContainer,In most static case(non item pull in or out), the main run time of hopper tick is on this function.
I know that your intention is to determine the hopper situation in advance, so as to reduce the execution of some codes. But unfortunately, your optimization did not have a very good effect due to the low execution efficiency of this function. When dealing with items with nbt, this mspt occupancy is more obvious.
So I hope you can try to optimize the code of this function to improve its execution efficiency.
I recently did some tests when I was studying the problem of too high MSPT occupancy of the hopper. I used the hook function method to test the execution time of some hopper-related functions.
After observing the test results, I annotated a function called Hopper::_isFullContainer,In most static case(non item pull in or out), the main run time of hopper tick is on this function.
I know that your intention is to determine the hopper situation in advance, so as to reduce the execution of some codes. But unfortunately, your optimization did not have a very good effect due to the low execution efficiency of this function. When dealing with items with nbt, this mspt occupancy is more obvious.
So I hope you can try to optimize the code of this function to improve its execution efficiency.
Here are some of my test results:
conditions
hopper tick time(ms)
full check time(ms)
empy hopper
0.013
0.0
full hopper (5 full shulker box,same below)
0.884
0.872
full hopper points to full chest
5.289
5.287