Dedupe script generation was changed to single-threaded
in one of an earlier commits in order to fix the ordering
of the commands printed in --dry-run.
Unfortunately this caused a performance degradation
because the script generation involves a significant amount of I/O.
The script generation could not keep up with the pace at which
multiple threads can process the commands, and those threads
were heavily spinning waiting for work.
This commit reverts that change and implements the ordering of items
in a different way. Now all FsCommands are sent to
a PriorityQueue which puts them back in the correct order.
Dedupe script generation was changed to single-threaded in one of an earlier commits in order to fix the ordering of the commands printed in --dry-run.
Unfortunately this caused a performance degradation because the script generation involves a significant amount of I/O. The script generation could not keep up with the pace at which multiple threads can process the commands, and those threads were heavily spinning waiting for work.
This commit reverts that change and implements the ordering of items in a different way. Now all FsCommands are sent to a PriorityQueue which puts them back in the correct order.
Fixes #138