lincheney / fzf-tab-completion

Tab completion using fzf
GNU General Public License v3.0
623 stars 40 forks source link

Good but slow #61

Closed zhouzq-thu closed 1 year ago

zhouzq-thu commented 1 year ago

I both tried this repo and fzf-tab. I think the search results of this repo is better. However, it is very slow, including the path completion and the command completion. Could you optimize?

lincheney commented 1 year ago

I've not had issues with performance. Are you able to provide more details about what exactly is slow?

brokenricefilms commented 1 year ago

I've not had issues with performance. Are you able to provide more details about what exactly is slow?

Screencast from 2023-03-08 16-31-39.webm

when press enter key I felt zsh slower than bash

ahmetb commented 1 year ago

Came here to say this as well (sorry if this comment is noise). The speed issue is very obvious if you do lsTabTab. It takes a good 200 ms to list files in a dir and put that on fzf. I know that it's not fzf because if I hit Ctrl+T shortcut (from fzf's own integration with zsh), it's instant.

I hate to say it but it's probably the fact that it's written in node.js.

lincheney commented 1 year ago

I'm afraid that since I can't reproduce this, I can't fix this myself.

If you are experiencing this issue and you want this to be resolved, you will have to debug why this is happening for you.

Re probably the fact that it's written in node.js, you are mistaken; the tab completion for each program is written in the respective language, if you are using the zsh tab completion it is written in zsh. only the tab completion for nodejs is written in nodejs,

lincheney commented 1 year ago

If you are experiencing slowness on Mac OS, I've merged in https://github.com/lincheney/fzf-tab-completion/pull/73 from @itsjfx which might help. You will need to install GNU grep (instead of using the builtin macos grep).