vim-gutentags
vim-gutentags copied to clipboard
Use ripgrep (rg) instead of grep where available
Ripgrep is orders of magnitude faster than grep especially on big files.
Here is a sample from my workspace. My tags file for entire project hovers around 16G
du -sh tags 7.3G tags
time rg --text -ve ^[^?]+?my_project_foo.cpp? tags > tgs.tmp1
real 48.223 user 7.852 sys 38.735 pcpu 96.60
time grep --text -Ev ^[^?]+?my_project_foo.cpp? tags > tgs.tmp
real 106.256 user 13.446 sys 88.974 pcpu 96.39
That seems like a good idea! Could you adjust the change so that we store grep
or rg
inside a ${GREP}
variable, and then use that for the command line? This way the command line isn't duplicated. Thanks!
@ludovicchabant : I just stumbled over this tab in my browser which must have been open since two months :-) I had commented on this PR and after the last change it looks good to me. I have approved it (symbolically). Can this be merged? I have applied this code locally and didn't notice anything not working.