Code Monkey home page Code Monkey logo

Comments (4)

BurntSushi avatar BurntSushi commented on June 1, 2024

I thought there was already an open issue for this, but I couldn't find it.

This is a rather difficult optimization to do and is blocked on a rewrite of globset and probably ignore. It's something I've been working on off-and-on for a while now, but it's unlikely to land any time soon. I'm not even 100% certain it's possible unless the --no-ignore flag is also passed. The interaction point between -g/--glob and ignore files will need to be carefully considered for something like this.

Your best bet is to use some other tool to filter out files first. Possibly even using your shell's glob support. Although those could in theory end up being slower than ripgrep even when ripgrep visits more than it needs to. It depends.

from ripgrep.

BGR360 avatar BGR360 commented on June 1, 2024

Alright, thanks for clarifying. Using fd to write all of the interesting filepaths to a file and then xargs-ing that into rg got me results way faster!

It would be neat if rg supported piping in filenames from stdin. So I wouldn't have to wait for fd to finish its scan. Should I post another enhancement issue for that?

from ripgrep.

BurntSushi avatar BurntSushi commented on June 1, 2024

That's #273. But you shouldn't need it. You should be able to pipe the output of fd straight into ripgrep with xargs without writing to an intermediate file.

from ripgrep.

BGR360 avatar BGR360 commented on June 1, 2024

I can use xargs yes but ripgrep won't start searching any of those paths until the fd scan completes.

EDIT: oh nvm i can make xargs chunk it up into multiple rg invocations

from ripgrep.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.