Using fd vs indexed searches (baloo)
Using fd vs indexed searches (baloo)
Hi All,
I recently tried out the KDE/Plasma search (Baloo).
- Indexing full content was too slow (I have some 100GB of data), and I disabled it.
- Indexing filenames only was reasonably quick.
- The search was very restrictive (full words only, miscategorized files). To make it usable for me, I had to get a list of all files and dump it to fzf, which worked reasonably well.
- Using
baloosearch6to get a long list of files provides almost no noticable performance improvment overfd:(Both commands found about 11,000 files. I'm using a SSD with about 500mbps read speed).> time ( baloosearch6 mimetype:application/pdf | wc -l ) 0.05s user 0.03s system 111% cpu 0.069 total > time ( \fd -H --no-ignore-vcs --xdev -tf -tl '.pdf$' | wc -l ) 0.24s user 0.15s system 364% cpu 0.107 total - If I try it again with a larger file set :This time baloo found 96000 files, and fd found 59000 files. (fd might have run faster cause of disk caching.)
> time ( baloosearch6 -d VSync/ '' | wc -l ) 0.23s user 0.10s system 123% cpu 0.264 total > time ( \fd -H --no-ignore-vcs --xdev -tf -tl --base-directory=VSync/ | wc -l ) 0.13s user 0.11s system 456% cpu 0.052 total
fd used more CPU no doubt. But the wall time difference in performance is so small that it doesn't make sense to me to use an indexed search anymore.
Any thoughts?