Logistics Pipes

Logistics Pipes

13M Downloads

Quicksort module fails stochastically when used against an AppEng ME Interface facing a large storage network

ab9rf opened this issue ยท 1 comments

commented

The Quicksort module fails sometimes at trying to pull items from an AppEng storage network, with the likelihood of failure increasing as the number of item types that are in the AE network grows, and with the degree of activity of the AE network. Against a sufficiently large and busy AE storage network, Quicksort will spend most of its time in the "stalled" state.

I believe this is because the item list returned by getItemsAndCount is of essentially unstable size and content from tick to tick. The Quicksort module tries to keep track of its place in this list, but since the list changes from call to call, this results in it putting bookmarks into a book that's constantly moving. It might make sense to have Quicksort check the size of the inventory against the previous size, and if they differ, start from the start instead of trying to pick up in the middle of a list that no longer exists.

commented

Fixed in 86015c1