evanlucas / fish-kubectl-completions

kubectl completions for fish shell
MIT License
576 stars 42 forks source link

Speed of completions #23

Closed a-hat closed 4 years ago

a-hat commented 4 years ago

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?

evanlucas commented 4 years ago

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!

a-hat commented 4 years ago

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. :)

montaro commented 4 years ago

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

Thanks!