zsh-workers
 help / color / mirror / code / Atom feed
From: Jordan Patterson <jordanp@gmail.com>
To: zsh-workers@zsh.org
Subject: ZSH performance regression in 5.8.1.2-test
Date: Mon, 25 Apr 2022 12:16:46 -0600	[thread overview]
Message-ID: <CAHDOzW6wE2aP6-MMrBNAUYttzQwi2VC_OY7tJDwkQwrtp47zEQ@mail.gmail.com> (raw)

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

Hi:

This recent fix has led to a performance regression in zsh: 49792:
Non-interative shell input is line buffered.

I had noticed that my shell was loading slower and found this Gentoo
bug report (https://bugs.gentoo.org/839900).  They had recently picked
up this patch to apply to the current 5.8.1 version.

I've benchmarked loading zsh with the test release and a couple of
previous versions with my zsh configuration:

Benchmark 1: prefix/5.8/bin/zsh -i -c exit
  Time (mean ± σ):     262.6 ms ±  10.7 ms    [User: 184.7 ms, System:
66.4 ms]
  Range (min … max):   246.7 ms … 279.4 ms    11 runs

Benchmark 2: prefix/5.8.1/bin/zsh -i -c exit
  Time (mean ± σ):     226.5 ms ±   6.0 ms    [User: 155.7 ms, System:
57.4 ms]
  Range (min … max):   216.6 ms … 238.5 ms    13 runs

Benchmark 3: prefix/5.8.1.2-test/bin/zsh -i -c exit
  Time (mean ± σ):      2.088 s ±  0.027 s    [User: 0.503 s, System: 1.562 s]
  Range (min … max):    2.056 s …  2.149 s    10 runs

Summary
  'prefix/5.8.1/bin/zsh -i -c exit' ran
    1.16 ± 0.06 times faster than 'prefix/5.8/bin/zsh -i -c exit'
    9.22 ± 0.27 times faster than 'prefix/5.8.1.2-test/bin/zsh -i -c exit'

I've also generated some flamegraphs of the same commands, which I've
attached.  The test version now spends most of its time doing the
reads.

Jordan

[-- Attachment #2: zsh-5.8.1.svg --]
[-- Type: image/svg+xml, Size: 224043 bytes --]

[-- Attachment #3: zsh-5.8.1.2-test.svg --]
[-- Type: image/svg+xml, Size: 256770 bytes --]

[-- Attachment #4: zsh-5.8.svg --]
[-- Type: image/svg+xml, Size: 260490 bytes --]

             reply	other threads:[~2022-04-25 18:22 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-25 18:16 Jordan Patterson [this message]
2022-04-25 18:56 ` Bart Schaefer
2022-04-25 19:20   ` Stephane Chazelas
2022-04-25 21:27     ` Bart Schaefer
2022-04-26  7:01       ` Bart Schaefer
2022-04-26  8:31         ` Peter Stephenson
2022-04-27  0:33           ` Bart Schaefer
2022-04-27 14:11           ` Stephane Chazelas
2022-04-27 15:02             ` Bart Schaefer
2022-04-27 15:07               ` Peter Stephenson
2022-04-27 15:17                 ` Bart Schaefer
2022-04-26 14:31         ` Jun. T
2022-04-26 15:15           ` Peter Stephenson
2022-04-27  0:55             ` Bart Schaefer
2022-04-27  9:16               ` Jun T
2022-04-27  0:38           ` Bart Schaefer
2022-04-27  9:34             ` Peter Stephenson
2022-04-27 10:28               ` Jun T
2022-04-27 12:42                 ` Jun T
2022-04-27 13:58                 ` Jun T
2022-04-27 15:25                   ` Bart Schaefer
2022-04-27 16:18                     ` Jun. T
2022-04-27 19:54         ` Jordan Patterson
2022-04-28  9:53           ` Jun T
2022-04-28 14:56             ` Bart Schaefer
2022-04-28 18:51           ` Jun. T
2022-04-29  0:28             ` Bart Schaefer
2022-04-29  2:25               ` Jun. T
2022-04-26  1:08 ` Bart Schaefer
2022-04-26  3:03   ` Jordan Patterson

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=CAHDOzW6wE2aP6-MMrBNAUYttzQwi2VC_OY7tJDwkQwrtp47zEQ@mail.gmail.com \
    --to=jordanp@gmail.com \
    --cc=zsh-workers@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).