Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PROPOSAL] Migration to ripgrep #123

Open
PetRacoon opened this issue Dec 11, 2017 · 4 comments
Open

[PROPOSAL] Migration to ripgrep #123

PetRacoon opened this issue Dec 11, 2017 · 4 comments

Comments

@PetRacoon
Copy link

https://github.com/BurntSushi/ripgrep

@therealpxc
Copy link

I can anticipate some concerns about portability, but I can imagine that this might have some performance benefits, given rg's performance in general.

I always have ripgrep installed on all of my systems, so I decided to give it a try. The only really tricky piece is that rg always uses extended regular expressions, so there are two changes required besides substituting rg for grep.

If you'd like to try the ripgrep version you can just uninstall tmux-plugins/tmux-copycat and then install therealpxc/tmux-copycat (I'm not sure that just replacing one with the other and reloading tmux will work right.).

If someone would like to write up some performance tests so that we can more objectively identify how much improvement there is, if any, that would be great.

@BogBel, I think it would be really helpful for this issue if you could expand the title and description to make it clear why someone might want this change, why it should be considered safe, etc.

I think that if we just modify the patterns to assume extended regular expressions, so that tmux-copycat can prefer rg but instead use grep -E when it is available, we can add preferential ripgrep support and retain the relative portability that tmux-copycat currently enjoys.

Is there any developer interest in merging such changes? I'm happy to open up a pull request for further discussion if so.

@bruno-
Copy link
Member

bruno- commented Dec 14, 2017

Hi, I hope this won't sadden anyone but in general I'm not in favor of this. grep performance is not critical to this plugin.

The speed / slowness comes mostly from bash and sending commands to tmux.

@alphaCTzo7G
Copy link

Actually I agree.. rg might be a bit of a overkill here.. Also are we using basic regular expressions or extended regular expressions here?

@udiNur
Copy link

udiNur commented Nov 2, 2024

I can anticipate some concerns about portability, but I can imagine that this might have some performance benefits, given rg's performance in general.

I always have ripgrep installed on all of my systems, so I decided to give it a try. The only really tricky piece is that rg always uses extended regular expressions, so there are two changes required besides substituting rg for grep.

If you'd like to try the ripgrep version you can just uninstall tmux-plugins/tmux-copycat and then install therealpxc/tmux-copycat (I'm not sure that just replacing one with the other and reloading tmux will work right.).

If someone would like to write up some performance tests so that we can more objectively identify how much improvement there is, if any, that would be great.

@BogBel, I think it would be really helpful for this issue if you could expand the title and description to make it clear why someone might want this change, why it should be considered safe, etc.

I think that if we just modify the patterns to assume extended regular expressions, so that tmux-copycat can prefer rg but instead use grep -E when it is available, we can add preferential ripgrep support and retain the relative portability that tmux-copycat currently enjoys.

Is there any developer interest in merging such changes? I'm happy to open up a pull request for further discussion if so.

I can anticipate some concerns about portability, but I can imagine that this might have some performance benefits, given rg's performance in general.

I always have ripgrep installed on all of my systems, so I decided to give it a try. The only really tricky piece is that rg always uses extended regular expressions, so there are two changes required besides substituting rg for grep.

If you'd like to try the ripgrep version you can just uninstall tmux-plugins/tmux-copycat and then install therealpxc/tmux-copycat (I'm not sure that just replacing one with the other and reloading tmux will work right.).

If someone would like to write up some performance tests so that we can more objectively identify how much improvement there is, if any, that would be great.

@BogBel, I think it would be really helpful for this issue if you could expand the title and description to make it clear why someone might want this change, why it should be considered safe, etc.

I think that if we just modify the patterns to assume extended regular expressions, so that tmux-copycat can prefer rg but instead use grep -E when it is available, we can add preferential ripgrep support and retain the relative portability that tmux-copycat currently enjoys.

Is there any developer interest in merging such changes? I'm happy to open up a pull request for further discussion if so.

Super old, but ended up using your code, thanks!
if there is anything better please lmk :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants