CaffeineMC / lithium-fabric

A Fabric mod designed to improve the general performance of Minecraft without breaking things
GNU Lesser General Public License v3.0
1.94k stars 188 forks source link

[WIP] Optimize item entity merging for full stacks #495

Closed Andrews54757 closed 1 year ago

Andrews54757 commented 1 year ago

What it does

Optimizes itemEntity tryMerge by only iterating over stacks that have canMerge true. Will store mergeable item entities in separate list, and remove them from the list when canMerge is no longer true.

Results

Without optimization, using HermitCraft boxes from Storage Tech.

No optimization

With optimization With optimization

Future work

Andrews54757 commented 1 year ago

https://github.com/Andrews54757/lithium-fabric/pull/1 Further optimizations for stacks that are more than half full.

Andrews54757 commented 1 year ago

Closing due to latest commit