mhinz/vim-grepper

`executable` seems to be really slow on arm64 macOS causing grepper

lanza opened this issue · 0 comments

lanza commented
for s:tool in g:grepper.tools
  if !has_key(g:grepper, s:tool)
        \ || !has_key(g:grepper[s:tool], 'grepprg')
        \ || !executable(expand(matchstr(g:grepper[s:tool].grepprg, '^[^ ]*')))
    call remove(g:grepper.tools, index(g:grepper.tools, s:tool))
  endif
endfor

This chunk of code is very slow on macOS arm64 neovim 0.5 as found by using vim's profiling setup. I'm guessing it has something to do with looking up different versions via rosetta. But at any rate it takes 3-4x as long as neovim with an empty init.vim just to load grepper.

Moving much of the code to autoload and lazy loading it would probably still be useful for even non-arm64-macOS.