neroquest.blogg.se

Events maker by dfactory shortcodes
Events maker by dfactory shortcodes













  1. Events maker by dfactory shortcodes full#
  2. Events maker by dfactory shortcodes code#
  3. Events maker by dfactory shortcodes windows#

And as a commenter already pointed out, it supports the -pager option. It can limit a search to one hardware device (-one-device), avoiding slow reads on network mounts. (This is harder than most people think.) It detects stdout redirects such as "ag blah > output.txt" and ignores output.txt. Off the top of my head: Ag reads the user's global gitignore. There are lots of little things that ag users are accustomed to that are either different or missing in ripgrep. My warning about the feature differences was meant to temper ag users' expectations. If a new user tries rg, they'll be very happy. It outputs results in a pleasant and useful format. In terms of core features, ripgrep is totally there. I have some further information retrievalish ideas on evolving the concept, but those will have to wait! It and ack have definitely triggered a new kind of searching.

events maker by dfactory shortcodes

I'd say those are pretty decent expectations. In exchange, rg gives you much better single file performance, better large-repo performance and real Unicode support that doesn't slow way down. And Mercurial support (but ag's is incomplete). Reviewing `ag`'s man page again, probably the only things missing from rg are -ackmate, -depth, some of the color configurability flags (but rg does do coloring), -passthrough, -smart-case and -stats maybe? I might be missing some others. The set of features supported by rg should be very very close to what is supported by ag. This was important to me, so I spent a lot of time documenting it.)ģ. (I think my blog post gives enough details that you could reproduce the benchmark environment precisely if you were so inclined.

Events maker by dfactory shortcodes windows#

For example, I enabled memory maps on Windows where they seem to do a bit better. For memory maps, you might get very different results depending on your environment. For the most part, this only tends to matter in the single-file benchmarks.Ģ. In my benchmarks, I do control for line numbers by either explicitly making it a variable (i.e., when you see `(lines)`) or by making all tools count lines to make the comparison fair.

Events maker by dfactory shortcodes code#

That said, may the best code searching tool win. It will be some time before all those little details are ironed-out. Take a look at to get a taste of what's missing or broken. What you will notice, however, are the feature differences. Unless you're searching some really big codebases, you won't notice the speed difference. Some expectation management: If you try out ripgrep, don't get your hopes up. If I didn't use certain gitignore rules or non-ASCII encodings, I didn't write the code to support them. These shortcomings are mostly because I originally wrote ag for myself. The author also points out correctness issues with ag. I'm OK with undefined behavior if something else changes the file while I'm reading it." I just want to read these bytes sequentially. I'm really hoping there's a flag I can pass to mmap() or madvise() that says, "Don't worry about all that synchronization stuff. It's a naive implementation, but it benchmarks comparably to the default mmap() behavior. I just added a -nommap option to ag in master. This is a big one, and I'm not sure what the deal is here. The printing code is the result of me merging a lot of PRs that I really shouldn't have.)ģ. (Note that even if you tell ag not to print line numbers, it still wastes time counting them. The blog post addresses this, but I think results without line numbers are far less useful so much so that I've traded away performance in ag. (For example, it can only search up to 2GB at a time.)Ģ. Switching would cause me to receive a lot of angry emails.

events maker by dfactory shortcodes

Events maker by dfactory shortcodes full#

I'd love to use a lighter-weight regex library in ag, but users are accustomed to full PCRE support. It looks like ripgrep gets most of its speedup on ag by:ġ. He's also totally right about defaults mattering.

events maker by dfactory shortcodes

The author did a great job of showing how each tool misbehaved or performed poorly in certain circumstances. That was a really good comparison of the different code searching tools.















Events maker by dfactory shortcodes