-
-
Notifications
You must be signed in to change notification settings - Fork 820
Description
I have noticed that Czkawka performance can be suboptimal when scanning for dups on HDDs. As far as I can see from the source code you are using rayon::par_iter to read/scan several files simultaneously (for example
czkawka/czkawka_core/src/duplicate.rs
Line 751 in e731f5e
.into_par_iter() |
In order to get optimal performance for HDDs it would be nice to have an option to limit the number of threads used for scanning. Ideally it should be limited to 1 thread per physical HDD, but I understand that that's non-trivial to do without major refactoring. So in order to provide a quick workaround perhaps we could provide at least on option to limit the number of threads to 1 globally? Even that would be much better than trying to read 4 files from an HDD at once (and it only gets worse if you have a more powerful CPU with more cores). I can see in Rayon FAQ that it's possible to limit the number of threads by setting RAYON_NUM_THREADS env variable, but I'm using Windows GUI and don't know how to set that. Can we add a GUI option to set the number of threads or disable parallelism (i.e. not use par_iter() at all)?