|
|
|
|
|
by aidenn0
1594 days ago
|
|
Very poorly. Supporting ignore files in the root of the search is trivial. However supporting files deeper is much harder, since find does not support this. For the case where few directories have ignore files, it's best to find all the ignore files first and generate one find command for each. If most directories have them then it's faster to exec find for each directory, and use maxdepth 1 In terms of me just using find by itself, I don't bother, since I find silently ignoring files to be a misfeature, and I don't use git at work anyways |
|
In any case, that's all fine and good, but your tool is very clearly not a clone of ag or ripgrep IMO. Whether you consider it a misfeature or not, the "smart filtering" aspect is probably the defining quality of things like ack, ag and ripgrep. So if you don't have that, I don't think you can call it a clone IMO. The smart filtering feature is right up there next to performance in terms what things users tend to like about these tools.
The other thing you're probably missing from a perf perspective, I think, is parallel directory traversal. Neither ack nor ag have this, but ripgrep does. ;-)