Since the unique algorithm is O(n log n) complexity, I was wondering if it would shorten execution time by splitting the image up to calculate the unique colours for each cropped region and then combining the results.
My first attempt looks like this:
Code: Select all
convert test.tif -crop x2000 -unique-colors -append -unique-colors temp.png
Another approach is to use MPC files, which obviously slows down the process, but halves the memory usage.
I've noticed that only one core does all the work when -unique-colors is running. Is there no way to parallelise this function?
Does anyone have any insights as to how to get fast results, while at the same time trying to limit memory use or is this as good as it gets?