ignore: check ignore rules before issuing stat calls

This seems like an obvious optimization but becomes critical when
filesystem operations even as simple as stat can result in significant
overheads; an example of this was a bespoke filesystem layer in Windows
that hosted files remotely and would download them on-demand when
particular filesystem operations occurred. Users of this system who
ensured correct file-type fileters were being used could still get
unnecessary file access resulting in large downloads.

Fixes #1657, Closes #1660
This commit is contained in:
Richard Khoury
2020-08-17 09:08:31 +10:00
committed by Andrew Gallant
parent 0ca96e004c
commit a28e664abd
2 changed files with 23 additions and 7 deletions

View File

@@ -27,6 +27,11 @@ Security fixes:
This is the public facing issue tracking CVE-2021-3013. ripgrep's README
now contains a section describing how to report a vulnerability.
Performance improvements:
* [PERF #1657](https://github.com/BurntSushi/ripgrep/discussions/1657):
Check if a file should be ignored first before issuing stat calls.
Feature enhancements:
* Added or improved file type filtering for ASP, Bazel, dvc, FlatBuffers,