File indexer heuristics #190
Replies: 5 comments
|
These heuristics were implemented to keep scan performance reasonably fast (I was concerned about CPU spikes being problematic for some users).
My overall thinking (feel free to challenge me on this) is that default indexing should prioritize speed over completeness. Users could then fine-tune coverage through preferences. I'd prefer to avoid subjecting new users to hour-long CPU spikes during their first experience. |
|
Ok - I wan't really thinking about performance when I was writing this. I did some benchmarking: My NTFS data mount: (Through ntffs-3g and FUSE; I/O limited):
My home dir: (BTRFS; CPU limited):
It doesn't seem like there's much of a performance hit for ignoring .gitignore. Given I used Everything (Windows search utilify that indexes literally everything) for some time and was never bothered by 'unwanted files', I don't think we need this. I think you're right as for hidden files - but maybe make exceptions like .cache configurable too? (We can't possibly cover every cache directory name - But FileSystemWalker seems to have a lot of opportunities for optimization - I'll try to work on that first. |
|
Yeah I guess it really depends on what is on your system, me personally I have a lot of I will run a quick benchmark on mine to see what's the exact difference I'm getting. Maybe we can just get rid of Also yes, the gitignore logic is very much unoptimized, mainly because the directory crawling isn't the slow part on my system. But this totally changes if you are using I/O limited mounts. |
|
@quadratech188 starting with v0.9.5 we don't use .gitignore by default (we may add a preference later) |
|
Just to confirm, |
Uh oh!
There was an error while loading. Please reload this page.
I was testing a pull request when I noticed that a file in
vicinae/srcwasn't showing up in file search - after some investigation, it turns out that the/srcpattern in .gitignore was ignoring it.I understand that this is a hack (there's a comment saying so), but it made me wonder if handling
.gitignoreat this stage (while scanning) is the correct way. I would've been equally stumped if I couldn't search for thevicinaeexecutable in /build.Same goes for hidden files - Given how often I access my dotfiles, I think whether to include them should be an option when querying, not when scanning.
But we obviously need to ignore things like the
.cachedir, and what should be ignored can be different for different people - I'd like some opinions on this.All reactions