Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: slow startup of zsh (1x slower than bash)
- X-seq: zsh-users 24216
- From: Peng Yu <pengyu.ut@xxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Subject: Re: slow startup of zsh (1x slower than bash)
- Date: Fri, 6 Sep 2019 08:44:32 -0500
- Cc: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>, julien.nicoulaud@xxxxxxxxx, zsh-users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=em6EcVfWNwEndJf1c/rk1vagjQnLL0Dt5LOOqHCbcok=; b=gUk12EM9qh7rELCe76y5/6xvK2Iy/BBN+qKuxxl/pHZqaY8QB2pmz0FZW4ZQsC+ZXD /HL/zeougzTe9jzhVWgAz90UIHbWZwRU4BLM4v3nCWgwihow9u5cp02VvRER7G/bbkJP bioICToBIZyka0wMLxaAdG4jQnxvtvUdumdyMRCWqFF8CDtwy996ME/FtuZVoV69teYC EKjf0T2EZq1HIaHXQHhLTJ/ZlMAzqI1HtRQt/Zj1Mmt6VKOP6At0wRtQ3mhFYLhP8eDw nlQc+6yNAC8MQmBPe3dasid2NyDb3R9+1nwJlPA3UTaoCnfUO03EZsaeDtK1O4r/tYxg //0g==
- In-reply-to: <CAN=4vMommtG_dPmfhWS4VXY-er9QxL4AKY70o-eR7TGw-ejzkA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CABrM6wk-psFFZcZW+M7OwD0ZwrMbNk4MN7e9aaJF9kBOFsVK4w@mail.gmail.com> <CAKc7PVDGmfMxkUzjmyFxJY7fNhHV16Z3xhQpNXnjEwAMf6G9hQ@mail.gmail.com> <CABrM6w=B8BP6Pk4HsW+XGDv0bpC9fYtNdr80SS6BtqegXJNcUA@mail.gmail.com> <CA+mcLN5dpscPNhpsKoA0j8tvcUh2-A7KOX7wNQYFQ7q3sdg+SA@mail.gmail.com> <CABrM6wkGd4=ikqoZOreovU95MpPe1fparZ+5qse-8fZ4M=3-OQ@mail.gmail.com> <CABrM6wk+PG2jopGJ8OqpUz-yaXqKet6aZJk2Oc7jZbjS3kWa9A@mail.gmail.com> <CAN=4vMrczC24GEH45UBaOtQY7rthiyWupmhPdJA+VgKuBnzobg@mail.gmail.com> <CABrM6wkvrMSpT=R22XYyA27hbqG75AyEuiamro9=Qs5kx2Skhg@mail.gmail.com> <CAN=4vMqS0o6QBOXXxPL2dCJGQLv+t61B0R+=eUSXaai3qgA4hQ@mail.gmail.com> <CABrM6w=0LBy99ePvChBe22v3XZ=JfY_Tbu0Guf8z6zcyALER3Q@mail.gmail.com> <CAN=4vMoYDBiYFdpo9v7OG_03DzjGPDGHww_0_wDsc3cbqwndJQ@mail.gmail.com> <CABrM6w=z3-w7U=MCJrHfVnQe9nk0G3c3fCbhKBPb_ye3u_YaGA@mail.gmail.com> <CAN=4vMommtG_dPmfhWS4VXY-er9QxL4AKY70o-eR7TGw-ejzkA@mail.gmail.com>
> > But because zsh is much slower than bash...
>
> This isn't a fair summary of your benchmark. It would be more accurate
> to say that zsh on some systems may take up to twice as long as bash
> to execute an empty script.
The slow startup is sufficient to deter me from using it as bash can
satisfy most of my usage. Although zsh has certain features that bash has,
I don’t want to trade-off the 2x startup time difference for those features.
I only care about the Unix variants but not Windows. My test is on Mac via
homebrew installations. I don’t think that there will be too much
difference in Linux. But I don’t have a native Linux machine to test.
Whoever has access to a native Linux machine may post the runtime here for
comparison of different OSes.
> Only if it is faster than bash, I may consider using it.
>
> Could you share some details of your environment in which the overhead
> of 6.7 ms per script is OK but 12 ms is not?
>
> When running a script interactively, this difference shouldn't matter.
I build a library that one causes another. In such cases, the startup time
matters, as most of scripts don’t take a long time to run, I don’t want the
startup eat up too much time. I know I can use ‘source’ circumvent this
problem to a certain extent. But having a shorter startup time is still a
good thing. If bash can do it, I don’t think zsh is absolutely unable to do
it.
--
Regards,
Peng
Messages sorted by:
Reverse Date,
Date,
Thread,
Author