4 ms·
It seems an order of magnitude slower to me: $ time grep -r some_token . real 0m0.467s user 0m0.252s sys 0m0.215s $ time ag some_token
by efaref 10y ago
It seems an order of magnitude slower to me:
$ time grep -r some_token .
real 0m0.467s
user 0m0.252s
sys 0m0.215s
$ time ag some_token
real 0m2.948s
user 0m0.112s
sys 0m3.083s
(Both run twice to ensure the disk cache was warm).
Am I doing something wrong?
- drcongo 10y agoCould be to do with where you're searching. The fact that ag skips everything in your .gitignore seems to have helped when I tested. Both of these were run at the root of my projects directory... $ time grep -r f_admin . 35.87s user 6.50s system 65% cpu 1:04.47 total $ time ag f_admin 1.51s user 4.94s system 196% cpu 3.284 total
- efaref 10y agoI'm searching mostly C code. I'm in the src directory, so there's nothing there except the source code.
- ggreer 10y agoWhat were you searching? I want to reproduce this.
- efaref 10y agoIt's a proprietary codebase, but it consists of around 500MB of mostly C and C++ files and their headers. There are a few other files (makefiles, a few perl/python scripts).
- ggreer 10y agoIs there any chance you could create a reproducible test case? I'm very curious as to what's causing the slowdown.