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

Telescope hanging on grep #64

Closed
matthewcm opened this issue Jun 21, 2022 · 5 comments
Closed

Telescope hanging on grep #64

matthewcm opened this issue Jun 21, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@matthewcm
Copy link

Hey.

I am getting huge memory spikes after running builtin.grep_string() or the picker rg.

  • Results in nvim completely hanging for about 2 minutes or so, before exiting telescope with error message:

  • error executing vim.schedule lua callback

  • buffer previewer expected lua number

  • Git files does not hang, or the other finders. I have tried the fzf-native plugin and the fzy-native plugin with no luck.

  • The grep string seems to only cause issues on particular searches.

  • if I grep 'hi' in my project, I get over 1000 matches, and I am able to navigate between the matches fine.

  • However if I search 'player' in my project, I get 500 matches, and telescope completely hangs the nvim client.

image
Seeing this odd memory spike behaviour after running grep.

Tried to replicate this on a minimal nvim init.lua with only Telescope installed, and saw that Telescope runs fine, so this is a matter of plugin conflict, or some other performance issue. I am running this on a pretty powerful 16Gb laptop.

@ecosse3
Copy link
Owner

ecosse3 commented Jun 21, 2022

I guess it can be some problem with your personal PC somehow because for me it works great after fzf-native was made for Telescope. You could try to open an issue directly in telescope repo to figure it out.

Did you run :checkhealth for looking for any possible problems?

Could you check if you are in your working directory via :pwd? I tried to grep import word with over 15000 matches and it works so quickly. If I :cd ~ to my home directory my neovim crashed after 800,000 found results which is huge.

I guess it can be just hardware/telescope issue. Probably it's not much matter of my config.

@matthewcm
Copy link
Author

Thanks, i'll try some things out. I've tried on another PC, with 64GB ram, and a very fast CPU and still seeing this issue.

My own NVIM setup of telescope did not have any problem. I've also tried to use fzy-native with the ecovim setup, and still seeing the issue. So I am not too sure, what is really conflicting here.

Maybe i'll start from a simple setup and keep adding things in until i notice the issue. HealthCheck does not seem to provide anything too useful.

@matthewcm
Copy link
Author

I found it. Seems to be https://github.com/NvChad/nvim-colorizer.lua
The autocommand is attaching to the telescope buffers.

@ecosse3 ecosse3 added the bug Something isn't working label Jul 12, 2022
@ecosse3
Copy link
Owner

ecosse3 commented Jul 12, 2022

@matthewcm Thanks for looking for that. I'll disable this extensions for telescope buffers and see the results. Will let you know.

ecosse3 added a commit that referenced this issue Jul 13, 2022
@ecosse3
Copy link
Owner

ecosse3 commented Jul 13, 2022

@matthewcm Fixed on dev branch. I'll do a release soon so it will be available on master.

@ecosse3 ecosse3 closed this as completed Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants