ohmyzsh: Loading kubectl plugin is slow
The main reason is that it regenerates the completion script over and over, with kubectl completion zsh.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 8
- Comments: 15 (5 by maintainers)
Experienced the same on Fedora, the cache doesn’t help because the slow part here is execution of function
__kubectl_bash_source()from${ZSH_CACHE_DIR}/kubectl_completion.Upstream issue: https://github.com/kubernetes/kubernetes/issues/59078
I am having the same problem in Mac OSX Catalina 10.15.7 since yesterday when I updated via
omz update. Startup time ranges from 5 to 10 seconds.The debug startup freezes for some seconds in the following lines:
@lbolla I don’t think, it is completely fixed or something else is wrong with my setup? In my machine, it still takes a lot of time to load. Here is the profiling screenshot.
That is on every new tab in Iterm. But on existing tab, it’s not taking much.
any news on improvements here?
Oh and you need to use kubectl 1.22 or higher for the faster zsh completion logic.