-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hangs / freezes when searching large directories, especially when JS files (e.g. maps) are found #49
Comments
It looks like the difference there is whether Lines 238 to 245 in a1f5b04
|
That leads me to believe that there must be faulty logic causing the hang in Lines 116 to 167 in a1f5b04
|
I think maybe it happens when there are multiple matches per line? For example, I had it just fail on a minified js file which had multiple The entire file is just one line w/o newlines, since the js is minified. |
This patch:
Generates the following error before hanging:
|
FYI I submitted a PR that bumps the maximum line buffer size from 64k to 1MB. you can install my fork via homewbrew:
|
Similar to #19 but I have experienced this both with the_silver_search and ripgrep.
ripgrep on its own does not exhibit the same behavior, confirmed.
A good way to repro it is to go to
~
and runrg export
. If you have many source code files scattered throughout your home directory (especially ones which contain JS files), you're likely to hit this. It will always hang just after listing a file name, prior to listing results found within that file.Furthermore, if piping the tag command to something like
| wc -l
, it does not hang.(P.S. Thanks for this tool - I've been using it for a long time, but never gotten around to posting this issue.)
The text was updated successfully, but these errors were encountered: