Skip to content

Grep is unusably slow #392

@lynndylanhurley

Description

@lynndylanhurley

Description

Grep hangs for 10+ seconds when used in a large codebase.

Expected Behavior

I'm coming from FZF, which seems to stream the results in as they become available. The UI never hangs and I get instant feedback as I type.

Actual Behavior

Telescope seems to hang until all the results have been processed, which sometimes takes 10+ seconds in large codebases.

In this .gif I'm typing continuously, but as you can see the input is frozen for several seconds:

telescope-slow

In this horrible codebase the only way to find things is to grep for them, so this is quite frustrating.

Details

  • nvim version: NVIM v0.5.0-dev+9223d1450
  • Operating system: MacOS 11.1
  • Telescope commit: 5d121ee
  • ripgrep 11.0.2

Configuration

" relevant plugins
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'romgrk/fzy-lua-native', { 'do': 'make' }
Plug 'nvim-telescope/telescope.nvim'
Plug 'nvim-telescope/telescope-fzf-writer.nvim'
Plug 'nvim-telescope/telescope-fzy-native.nvim'
Plug 'nvim-telescope/telescope-vimspector.nvim'

" telescope config
nnoremap <leader>t :lua require('telescope').extensions.fzf_writer.files()<CR>
nnoremap <leader>/ :lua require('telescope').extensions.fzf_writer.staged_grep()<CR>
nnoremap <leader>b <cmd>Telescope buffers<cr>
nnoremap <leader>c :lua require('telescope.builtin').git_bcommits()<cr>

lua <<EOF
require('telescope').setup {
    extensions = {
        fzf_writer = {
            use_highlighter = true
        }
    }
}
require('telescope').load_extension('fzy_native')
EOF

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions