telescope.nvim icon indicating copy to clipboard operation
telescope.nvim copied to clipboard

out of memory when grep_string over a large project ~61k files

Open steph0xr opened this issue 4 years ago • 3 comments

Description

nvim use all my ram when search with telescope grep_string, in a large codebase (git ls-files | wc -l --> 61k files).

Expected Behavior limit the amount of max ram usage, or maximum search items

Actual Behavior system freezes

Details

#Steps to reproduce: use a large code base with minimum 60k files launch a telescope grep_string on this project

#Environment Information:

  • nvim --version: NVIM v0.5.0-dev+1174-g9f5c8226b
  • Operating system: ubuntu
  • Telescope commit: 6ac5ee0

thanks

steph0xr avatar Jun 28 '21 12:06 steph0xr

I'm getting similar behaviour in a much smaller codebase (git ls-files | wc -l --> 254 files). Very intense RAM usage on a simple search string (several gigabytes at least, not sure how much more it would consume if it didn't max out my RAM).

  • nvim --version: NVIM v0.6.1
  • Operating System: Manjaro, kernel version 5.10.98-1-MANJARO
  • Telescope commit: 1daf091

What grep_string did you actually do? Just :Telescope grep_string because that one greps for the word under cursor. Or did you do Telescope grep_string search= which basically loads every line of your project into memory so of course if your project is big enough you could run out of memory

Conni2461 avatar Mar 11 '22 11:03 Conni2461

I think I was initially doing Telescope grep_string search= but I just tried it with Telescope grep_string and get the same issues for certain words.