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

Performance Hit on Oh My Zsh #49

Open
aksh1618 opened this issue Dec 17, 2018 · 2 comments
Open

Performance Hit on Oh My Zsh #49

aksh1618 opened this issue Dec 17, 2018 · 2 comments

Comments

@aksh1618
Copy link

I love Alias tips, but it causes my startup time to take a severe hit, as shown by zprof:

~> zprof
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)    1         242.86   242.86   43.35%    242.86   242.86   43.35%  _alias_tips__preexec

Is there any way to fix/optimize this? I am using oh-my-zsh.

@djui
Copy link
Owner

djui commented Dec 17, 2018

I think the performance problems stem from the Python code that is being run; I believe the actual Zsh code is quite minimal and fast. It also depends linearly on the amount aliases and functions one has, but the Python runtime start up should be the dominant factor.
If we would port the code from Python to Go/Rust/C we could ship OS dependant binaries and get a better startup latency.

@yld
Copy link

yld commented Dec 30, 2019

You may look at https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/alias-finder witch is about 10 times faster (written in pure ZSH).

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

No branches or pull requests

3 participants