Re:Show HN: Tag – instantly jump to your ag matches
by omegote on Monday June 13, 2016 @01:17AM
(#11891845)
Not sure about this wrapper for an unknown tool, "ag". I don't know, what's wrong with good ol' grep -Hnir ?
[ Parent
| on HN ]
Re:Show HN: Tag – instantly jump to your ag matches
by wowoc on Monday June 13, 2016 @01:20AM
(#11891854)
Ag is way faster.
Re:Show HN: Tag – instantly jump to your ag matches
by efaref on Monday June 13, 2016 @06:06AM
(#11892699)
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?
Re:Show HN: Tag – instantly jump to your ag matches
by drcongo on Monday June 13, 2016 @09:46AM
(#11893794)
Could 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
Re:Show HN: Tag – instantly jump to your ag matches
by efaref on Tuesday June 14, 2016 @11:44AM
(#11902750)
I'm searching mostly C code. I'm in the src directory, so there's nothing there except the source code.
Re:Show HN: Tag – instantly jump to your ag matches
by ggreer on Monday June 13, 2016 @01:03PM
(#11895415)
What were you searching? I want to reproduce this.
Re:Show HN: Tag – instantly jump to your ag matches
by efaref on Tuesday June 14, 2016 @11:42AM
(#11902736)
It'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).