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

Great plugin but too slow. #3

Closed
mohitleo9 opened this issue Mar 17, 2015 · 4 comments
Closed

Great plugin but too slow. #3

mohitleo9 opened this issue Mar 17, 2015 · 4 comments

Comments

@mohitleo9
Copy link

Hey, this is a really cool feature, reduces the clutter in search results a lot. But it is way too slow as compared to Ag.vim . I haven't looked at the code, but I assume it's doing some post processing in vimscript to the results, and trying to create a buffer with locations, would be cool if you could somehow make it faster (maybe push the processing to ag and vim location buffer?)

@gabesoft
Copy link
Owner

Yea, I noticed that too. I'll try to make it faster. For the record though, it only gets slow for large amounts of results returned from ag. So, as a workaround, having more specific searches that return less results will be more performant.

@gabesoft
Copy link
Owner

So, I looked into it and it's not the processing of the results, but the system call itself that takes longer. The reason is that Ags.vim returns more lines than Ag.vim. However, you can set the g:ags_agcontext to 1 to get less lines and better performance.

@gabesoft
Copy link
Owner

I've added a fix to allow for setting ag args to 0. So setting this value let g:ags_agcontext = 0 will result in performance similar to Ag.vim

@gabesoft
Copy link
Owner

Fixed by ae1497e

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

2 participants