Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: slow startup of zsh (1x slower than bash)



On Mon, 3 Dec 2018 at 17:28, Peng Yu <pengyu.ut@xxxxxxxxx> wrote:
>
> Hi,
>
> The following example shows that zsh startup time is much slower than
> other shells. Can this be improved to at least as fast as bash?
>

Is it the last zsh version that's being tested? There was 2x startup
improvement at 5.4 or something like this.

Also, Zplugin can load plugins after prompt, I load 20 plugins, and my
startup times are:

repeat 5 { time /usr/local/bin/zsh-5.6.2-dev-1 -i -c exit }
/usr/local/bin/zsh-5.6.2-dev-1 -i -c exit  0,09s user 0,04s system
117% cpu 0,111 total
/usr/local/bin/zsh-5.6.2-dev-1 -i -c exit  0,10s user 0,05s system
119% cpu 0,130 total
/usr/local/bin/zsh-5.6.2-dev-1 -i -c exit  0,11s user 0,05s system
121% cpu 0,129 total
/usr/local/bin/zsh-5.6.2-dev-1 -i -c exit  0,09s user 0,04s system
115% cpu 0,119 total
/usr/local/bin/zsh-5.6.2-dev-1 -i -c exit  0,09s user 0,04s system
117% cpu 0,109 total

I even load prompt after a default prompt, ~ 100 ms after it. The
Star-Trek console-like impression this gives can be visible here:
https://asciinema.org/a/156726 – much is going on, automatically, in
background.

> --
> Regards,
> Peng

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org



Messages sorted by: Reverse Date, Date, Thread, Author