ermig1979 / AntiDupl

A program to search similar and defect pictures on the disk
https://ermig1979.github.io/AntiDupl
MIT License
1.27k stars 93 forks source link

[performance] Moving to recycle bin is slow #23

Open yfdyh000 opened 6 years ago

yfdyh000 commented 6 years ago

This is my feeling, it seems to be significantly slower than ordinary moving files in Windows Explorer, about 15 files/s on 7200rpm HDD. Maybe it has performance bottlenecks and can be optimized through multithreading, big buffers, etc?

1n5aN1aC commented 6 years ago

I am also unsure the source of this, but I recently ran the "automatically choose the recommended action" option with a few thousand duplicates selected, and it took 4+ hours to delete them all, while the initial search was amazingly fast!

Then after I went through a few more manual duplicate selections, it got to deleting them from the undo queue, and took another couple hours to delete them from there.

Still an amazing tool, but very slow if you select and run many at the same time.

ermig1979 commented 6 years ago

The main reason of this behaviour (slow deleting) is undo/redo feature. The program does not delete images to recycle bin but renames and marks images as hidden. The real deletion is performed if (undo/redo) queue is overflow, or at the end of program, or before the start of new search. For real deletion original names of images are restored and then their are deleted to recycle bin.

If you set 0 to options "Options - Advanced - Queue size of undo" then images will be deleted directly to recycle bin.