zsh-users
 help / color / mirror / code / Atom feed
From: Zach Riggle <zachriggle@gmail.com>
To: Roman Perepelitsa <roman.perepelitsa@gmail.com>
Cc: Bart Schaefer <schaefer@brasslantern.com>, Zsh Users <zsh-users@zsh.org>
Subject: Re: Shell startup, aliases vs. functions vs. autoloadable functions, and zcompile benefits
Date: Tue, 30 Nov 2021 02:25:04 -0600	[thread overview]
Message-ID: <CAMP9c5kH1ZjQWC-szj+sSF-RZQn9q67qy-_6T84Qf4w-LkybSg@mail.gmail.com> (raw)
In-Reply-To: <CAN=4vMoJZZZCbPK-5Ss=gE7iwieHZ4HFF=H9O0TzgMrGBPio6g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]

The only performance metric I care about is the number of milliseconds
between pressing ⌘T to open a new tab, and having a shell available to
accept input.  Sure, input gets buffered before the prompt shows -- but
it's still what I was trying to improve.

For this metric, I think "zsh -il -c exit" is a sufficient benchmark -- I
have looked at zsh/zprof, and it provides some insight, but when 90% of the
startup time is the "source" builtin and there's no additional granularity
(source a → source b → source veryslow → source d) so it's not quite useful.

I looked at zsh-bench when it hit HackerNews (I think?) and its feature set
does not appeal to me.  I don't care whether oh-my-zsh or prezto are
faster, or which prompt can be the faciest 18-segment display and still
have no input lag.  As its benchmarks show, prezto is usually high on the
"first prompt lag" and very low on "input lag".  The former is what I was
testing for.

*Zach Riggle*


On Tue, Nov 30, 2021 at 1:51 AM Roman Perepelitsa <
roman.perepelitsa@gmail.com> wrote:

> On Tue, Nov 30, 2021 at 3:30 AM Zach Riggle <zachriggle@gmail.com> wrote:
> >
> > The benchmark I used
> >
> > $ hyperfine 'zsh -i -l "exit 0"'
> >
> >
> > Obviously this is not the BEST benchmark [for checking shell startup
> time]
>
> Obviously. It's the worst or at least a strong contender for the title.
>
> Since you care about interactive zsh performance, at least skim
> through the homepage of zsh-bench. It'll save you time.
>
> Roman.
>

[-- Attachment #2: Type: text/html, Size: 2238 bytes --]

      parent reply	other threads:[~2021-11-30  8:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-27  8:10 Zach Riggle
2021-11-27  8:33 ` Roman Perepelitsa
2021-11-27 20:22   ` Bart Schaefer
2021-11-30  2:30     ` Zach Riggle
2021-11-30  4:11       ` Bart Schaefer
2021-11-30  8:18         ` Zach Riggle
2021-11-30  7:51       ` Roman Perepelitsa
2021-11-30  8:10         ` Mikael Magnusson
2021-11-30  8:27           ` Mikael Magnusson
2021-11-30  8:30             ` Zach Riggle
2021-11-30  9:11             ` Roman Perepelitsa
2021-11-30 11:49               ` Zach Riggle
2021-11-30 12:30                 ` Roman Perepelitsa
2021-11-30 15:10                   ` Zach Riggle
2021-11-30 16:37                     ` Bart Schaefer
2021-11-30 16:41                       ` Roman Perepelitsa
2021-11-30  8:29           ` Roman Perepelitsa
2021-11-30  8:25         ` Zach Riggle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMP9c5kH1ZjQWC-szj+sSF-RZQn9q67qy-_6T84Qf4w-LkybSg@mail.gmail.com \
    --to=zachriggle@gmail.com \
    --cc=roman.perepelitsa@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).