evanlucas / fish-kubectl-completions

kubectl completions for fish shell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Speed of completions

a-hat opened this issue · comments

Hi @evanlucas! First, thanks for your work on this great project!

I am experiencing some issues with the speed of the completions. It takes about 2-3 times more compared to bash or zsh on the same kubernetes cluster. This makes it about 7-12secs for a completion, which makes it quite unusable unfortunately.

I am using the latest master of this repository.

Do you have any ideas what could be the issue, or how I could debug this?

Hi @a-hat! Thanks for the kind words ❤️.

It is more than likely slower due to supporting CRDs. If you do not use CRDs, you can set the FISH_KUBECTL_COMPLETION_COMPLETE_CRDS environment variable to anything other than 1. That should help speed things up. Let me know if that doesn't help. Thanks!

Hey @evanlucas, thanks for your prompt answer!

Setting FISH_KUBECTL_COMPLETION_COMPLETE_CRDS does help, now the completion speed is comparable to zsh. Thank you!

As a side note, I had already tried to set this variable before, but I was not aware that it apparently does not affect an already running shell. :)

Thanks for the tip, it works fine!
A question please, why zsh still has the same speed even with CRDs completion?

Thanks!