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

exponentially slow when run source .zshrc several times #625

Closed
ewen-goisot opened this issue Jul 9, 2019 · 4 comments
Closed

exponentially slow when run source .zshrc several times #625

ewen-goisot opened this issue Jul 9, 2019 · 4 comments

Comments

@ewen-goisot
Copy link

I use ZSH with a few plugins including zsh-syntax-highlighting,
I sometimes run source ~/.zshrc several times, for example when I edit the prompt theme (in oh-my-zsh).
First time I source, it takes approximately 0.14 seconds, so it's not so slow,
but if I run it 10 times on the same shell, it takes 0.26 seconds
20 times, 1.31 seconds
30 times, 10.89 seconds
40 times, 40.61 seconds
50 times, 111.55 seconds (and I didn't tried more).
.
The time does not increases if I use only other scripts (I use git, z, zsh-autosuggestion),
and time increases (twice faster but increases the same way) if I use only zsh-syntax-highlighting and no other plugin.

@danielshahaf
Copy link
Member

danielshahaf commented Jul 9, 2019 via email

@danielshahaf danielshahaf changed the title exponantialy slow when run source .zshrc several times exponentially slow when run source .zshrc several times Mar 17, 2020
@ewen-goisot
Copy link
Author

ewen-goisot commented Aug 25, 2020

Use exec zsh instead of re-sourcing .zshrc

exec zsh works with constant time, and I didn't noticed any other issues with it.

@danielshahaf
Copy link
Member

Thanks for following up.

In the meantime redrawhook has been merged, which should independently address the issue.

@danielshahaf
Copy link
Member

danielshahaf commented Aug 26, 2020 via email

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

No branches or pull requests

2 participants