From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 7566ac65 for ; Fri, 6 Sep 2019 13:45:25 +0000 (UTC) Received: (qmail 27963 invoked by alias); 6 Sep 2019 13:45:18 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24216 Received: (qmail 5103 invoked by uid 1010); 6 Sep 2019 13:45:18 -0000 X-Qmail-Scanner-Diagnostics: from mail-io1-f51.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25559. spamassassin: 3.4.2. Clear:RC:0(209.85.166.51):SA:0(-2.0/5.0):. Processed in 1.543024 secs); 06 Sep 2019 13:45:18 -0000 X-Envelope-From: pengyu.ut@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.51 as permitted sender) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=em6EcVfWNwEndJf1c/rk1vagjQnLL0Dt5LOOqHCbcok=; b=CLyWE1X0XiiHuCTkn4ZckB3sMp/6FaeP00gzF4GtzcBvL3ASuMwPTIr3sfGeh8lMWl EtcTZbDwOK4qvbc5XTnA4VP/x8ZDJMk5hvZMi7WSVFEQkM4fJHR5WUCUhb5nSQzkc+sr 3QpFqqZc9OKXw7bBU5ZLlux7729nipqnh9uNVbCPwfL8eCDSgudWPIV4hVbUKZK/7C+5 mmnCtn8TleOOzIusFZxOCTJfhUW7q6NZQT87yBGrpp+geEHUi8oge9TYTDmpxNsLAGz/ k0C6TpkFOo616Pvq9XTca4RLDgw/7uDVy1K/NyeYPyFvgVZ1+RCFG+3nSvqT/pyJ0fKI MB6A== X-Gm-Message-State: APjAAAVA1wI77fOf3zKXeliTmtQl/Ay6L9O2G8alyLBQf4C0OmXt0kZ+ rMYITdUrNzoGDxzXhWWk7iEFbyRag95oh6npSmA1PElt X-Google-Smtp-Source: APXvYqx74eqyNRerHXPRUnENC6tqWRz5D1YbdYoVwaSuIxvhGz3OBH4vgHxB7nzLoqUN3exh4MKOT6fOHm5mzqDoFaw= X-Received: by 2002:a5d:9493:: with SMTP id v19mr8202958ioj.92.1567777484171; Fri, 06 Sep 2019 06:44:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Peng Yu Date: Fri, 6 Sep 2019 08:44:32 -0500 Message-ID: Subject: Re: slow startup of zsh (1x slower than bash) To: Roman Perepelitsa Cc: Sebastian Gniazdowski , julien.nicoulaud@gmail.com, zsh-users Content-Type: multipart/alternative; boundary="00000000000007f0c20591e2a4d7" --00000000000007f0c20591e2a4d7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > 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=E2=80=99t 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=E2=80=99t think that there will be too much difference in Linux. But I don=E2=80=99t have a native Linux machine to tes= t. 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=E2=80=99t take a long time to run, I don=E2= =80=99t want the startup eat up too much time. I know I can use =E2=80=98source=E2=80=99 cir= cumvent this problem to a certain extent. But having a shorter startup time is still a good thing. If bash can do it, I don=E2=80=99t think zsh is absolutely unab= le to do it. --=20 Regards, Peng --00000000000007f0c20591e2a4d7--