LeaderF icon indicating copy to clipboard operation
LeaderF copied to clipboard

How to set throttle/debounce time for search?

Open TisnKu opened this issue 1 year ago • 6 comments

Hi there, thanks for the amazing plugin. I am working on a huge project, before finishing typing, temp result will continue to show up, which is slow and not useful. Even when I finish typing, it is still updating previous temp result. Debounce the search in this case would improve performance. I did some search and didn't find the related config. Is there an existing config option to do it? Or could you add the feature?

TisnKu avatar Sep 14 '22 14:09 TisnKu

Just wait until the indexing is finished. Then the files list will be cached in a file. Make sure g:Lf_UseCache is 1. Make sure the C extension is installed.

Yggdroot avatar Sep 15 '22 02:09 Yggdroot

I added let g:Lf_UseCache = 1, but still the same. Typing can also be freezed by search result half way like the following. I have to kill the terminal window. image

TisnKu avatar Sep 15 '22 03:09 TisnKu

Seems like there are 2 issues:

  1. Temp result freezes input.
  2. When result is too big, for example, a huge one line json file is in result, the whole vim is dead.

TisnKu avatar Sep 15 '22 03:09 TisnKu

Please refer to https://github.com/Yggdroot/LeaderF/issues/318.

Yggdroot avatar Sep 15 '22 03:09 Yggdroot

Thanks. The freezing problem fixed after specifying max-column. Would be even better to have the debounce time setting, since my project is really large and typing half way can slowly show a lot of temp result.

TisnKu avatar Sep 15 '22 03:09 TisnKu

There is no way.

Yggdroot avatar Sep 15 '22 07:09 Yggdroot