Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Shell startup, aliases vs. functions vs. autoloadable functions, and zcompile benefits
- X-seq: zsh-users 27401
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Shell startup, aliases vs. functions vs. autoloadable functions, and zcompile benefits
- Date: Tue, 30 Nov 2021 10:11:31 +0100
- Archived-at: <https://zsh.org/users/27401>
- In-reply-to: <CAHYJk3RzKT1_WoyKf4FAZ=ffQ7bbiTzSgMP=3ZPbFPWMD2QpiA@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAMP9c5=AkW8B0byaw9J-_rVJ0B19q9xx3wjz3MAgJr6uCF6vNQ@mail.gmail.com> <CAN=4vMpyybbN-DTT7eAXdxV_a=CtaEcaNTKEszQjgL8urTY_zg@mail.gmail.com> <CAH+w=7ZuG0z7m5_z8qCaGiCpDO0KRvXHWz3jkighvkaFcd6+LA@mail.gmail.com> <CAMP9c5=nQS_cw19fuKhKMJAAVPwEr5oCNUiBDBCWBiPC1KioWw@mail.gmail.com> <CAN=4vMoJZZZCbPK-5Ss=gE7iwieHZ4HFF=H9O0TzgMrGBPio6g@mail.gmail.com> <CAHYJk3TJFRKD3DjmR895BFKrJB649j6W=_u8_9fBY2ptprF2tQ@mail.gmail.com> <CAHYJk3RzKT1_WoyKf4FAZ=ffQ7bbiTzSgMP=3ZPbFPWMD2QpiA@mail.gmail.com>
On Tue, Nov 30, 2021 at 9:27 AM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
> It would be very useful to have an option to benchmark normal
> interactive shells instead of login shells
Sounds useful indeed. I added `--login no` (the default is yes).
> Also, you recommend against zcompiling .zshrc in your document, but
> first_command_lag_ms=56.709
> first_prompt_lag_ms=42.367
> exit_time_ms=40.885
>
> Increasing startup time by 33% seems like a bad tradeoff to me, then
> again, I know exactly how things work and am not likely to make the
> mistake you mention.
In the document I recommend that publishers of zsh configuration
frameworks (think ohmyzsh, etc.) not zcompile user rc files by
default.
FWIW, I zcompile my own rc files, although I do it in a way that
avoids issues caused by mtime and missing source files (I don't
mention the latter problem in the doc; basically, if you zcompile an
rc file and remove the source, the rc file will still be in effect).
The only downside I get from zcompiling is that aliases get expanded
differently but that's fine with me.
- References:
- Shell startup, aliases vs. functions vs. autoloadable functions, and zcompile benefits
- Re: Shell startup, aliases vs. functions vs. autoloadable functions, and zcompile benefits
- Re: Shell startup, aliases vs. functions vs. autoloadable functions, and zcompile benefits
- Re: Shell startup, aliases vs. functions vs. autoloadable functions, and zcompile benefits
- Re: Shell startup, aliases vs. functions vs. autoloadable functions, and zcompile benefits
- Re: Shell startup, aliases vs. functions vs. autoloadable functions, and zcompile benefits
- Re: Shell startup, aliases vs. functions vs. autoloadable functions, and zcompile benefits
Messages sorted by:
Reverse Date,
Date,
Thread,
Author