branchrust_reboot/main/item_allocscancel
4 Commits over 0 Days - ∞cph!
Merge: from main
Tests: none, no conflcits
Optim: don't sort items when trying to stack them
This saves us the potential allocation in Sort + less iterations over the array + can avoid doing slightly more expensive logic if we randomly jump around in item container.
Tests: various stacking scenarios from belt to inventory with wood stacks(incomplete stacks, full stack + incomplete, full stack only)
Optim: remove allocations from Item.MoveToContainer
Unity profiling showed an allocation inside it's sort impl, but I haven't seen it on server snapshots - will clean up if it is there
Tests: got a bunch of wood in separate stacks and stacked it via right click from belt to inv. Checked profiler to confirm expected allocations are gone.
Bugfix: BufferList can handle sorting subrange
Tests: moved items around in inventory(future cl)