Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve startup time drasticaly by caching to disk #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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