-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
slowdown with many files on the command line, compared to no arguments #136
Copy link
Copy link
Closed
Labels
bugA bug.A bug.
Description
Example using the https://github.com/keybase/client repo:
$ ls go/**/*.go | wc -l
1352
$ time rg blahblahblah go/
rg blahblahblah go/ 0.03s user 0.01s system 210% cpu 0.017 total
# <<< this is the slow one >>>
$ time rg blahblahblah go/**/*.go
rg blahblahblah go/**/*.go 0.14s user 0.01s system 104% cpu 0.137 total
$ time grep blahblahblah -r go/
grep --color=auto blahblahblah -r go/ 0.01s user 0.01s system 92% cpu 0.014 total
$ time grep blahblahblah go/**/*.go
grep --color=auto blahblahblah -r go/**/*.go 0.01s user 0.01s system 93% cpu 0.018 total
It looks like rg is slower when given a (long) list of files on the command line, than it is when it has to find those files itself. grep doesn't have this problem, so I don't think it's some confounder like my shell taking a long time to expand the glob.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugA bug.A bug.