Skip to content

Conversation

franklouwers
Copy link

I notice that start-up time was pretty long and looked at the caching code.

Although caching is used within a single session, the cache is not used cross-session. People opening lots of shells (like me) get a full kubectl config load every time a new shell is started.

This PR saves the 4 import vars (KUBE_PS1_CONTEXT, KUBE_PS1_KUBECONFIG_CACHE, KUBE_PS1_LAST_TIME and KUBE_PS1_NAMESPACE) to disk, read them from disk at startup, and will update the cache-file every time they change.

@franklouwers
Copy link
Author

Hi @jonmosco what are your plans with this PR?

@azhurbilo
Copy link

@jonmosco could you check this MR as it will be great to save time opening new console

@jonmosco
Copy link
Owner

@franklouwers Curious, with the recent changes made in regards to caching, does this improve the startup time for you? If not, I will revisit this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants