From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29126 invoked from network); 6 Jan 2021 06:27:47 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 6 Jan 2021 06:27:47 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1609914467; b=sd3S51C/GRYcGRXtgr/lpS3fMJwuhwuzp2zN+hT9CEdZBzGjfiWxkHFISsmTR1WF12R/6bdwSf 3YJskon41MUkVFwsckN2ZSplYQEllNWiPEevwzm0XkRiioloma3G/BX/X/CONnbcEPpXifTcEX MabdJb3u5ubM0pgKfFf8TSxG7JCmx/F7TwIi5+XzTulHCx2YIT8+yWS14xgwyhzlkvxsJ3HD1t nX1l5VAGyMMGqo8+tgyLzIZhHYFOS/mMzu+E3a637UOqkGybxGkrPZUs92I+ayvaG7Nt8yUxGT 357SUgs57oGPrMH8ODFBf93yFODk1XpY0mo+gADU0IqutA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-wr1-f52.google.com) smtp.remote-ip=209.85.221.52; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1609914467; bh=gZE8oXNCWZ5FKgT3Tr3JXZzhgZBU7bsxGw9Yu+LJZFk=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:MIME-Version: DKIM-Signature:DKIM-Signature; b=o2oiPWATT5xk8ov9+tc/2U7i9CzCVulgLIXHRDa/DrY4YKuWKs1gUDMOtIx2nB3XsXvPFv52sJ sB4z4S4qaWV425a8/7ZFYmhDE5fTsYFugHK3K9oxoNmv0kDygxKT7NwPHSQYorM2uvUOdKEjHU HQB3OrdvpiQsZKbm4G5xJYtf+aB6jPeqyMzIPdDOACud50GOHUlU/TXC9yD1lClSK3J3jdqjSS X+RsBVxFXuz4wnrUsZjyhcwtSxgFv5YbXGy3STX/Lv+7XM/cV9vLczKaSvPlJBj/7S3vwXdPoW Fb6tYvlNnlY83lY99i/zo1wBU6OOCVD4auZKJs07ZXiGtg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:MIME-Version:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=vJOV3h3CX/aPS8y5auejvWc5E9PaYOp7xvDjIVQu70s=; b=mmAEEPcxyLX1yW9Mi3BuJqoZCP lt0DmvzBNhcljBr0Izs5OWC5QLiLoivJ7pLh5TKnccZ8gqcu48oncG/Hfsj2UUQ+dtRwL2wXTfsX8 54zizpvix7+ZZscucaRifZf/WjiWslaFJ+MHHBGmpyRsYbsnTF1ATslJ2TNaDhaAErA6cKbXyW91X OG9bAgtXMo4MrjcoS3lsR6hmorx9icIPHas/4To/tHNjc/66hFgHTuZCQIWvmFGzrfiKDpV55/1GR /ONXpkabKgsZftX7EUspyTXa5vdZwhz6gRpfpBQfyY3yHxhZFRSIjQLWbWGGQSL/9NfyWT72mNynS t4IQ6A3g==; Received: from authenticated user by zero.zsh.org with local id 1kx2II-0005Al-Vx; Wed, 06 Jan 2021 06:27:43 +0000 Authentication-Results: zsh.org; iprev=pass (mail-wr1-f52.google.com) smtp.remote-ip=209.85.221.52; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-wr1-f52.google.com ([209.85.221.52]:36680) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kx2Ht-00050w-Mt; Wed, 06 Jan 2021 06:27:18 +0000 Received: by mail-wr1-f52.google.com with SMTP id t16so1416876wra.3 for ; Tue, 05 Jan 2021 22:27:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=vJOV3h3CX/aPS8y5auejvWc5E9PaYOp7xvDjIVQu70s=; b=PNdinTOjtaYflCHjZnq9PDgErnxCQK1FTmM7sFYbrfCdaOTLqHrZCT2Hj8w47Y6ufG 48mifAKL4FOtgXE/MBY8e2udfDWQzPJ3k6lxnpcVol7Y4YW1BcNlk7s3FTqpaflBOPCA Lr6+6NnMqMFQ9X+mrs9kp2FrtWnSX/aP0cW2UIN16oQWkTbio5PK3Q8SSO/AuNCwfzzD 5fL03okCqz6nRXA5rEThdaXUB1AtLEtfTShYNqVkYg4oWTdQ4zOLaI7eMr/9M+YIdzXH l4ut1bUxjjpDmhTwwjUVRXb5GiQZNrgA2PwisJePX8swUCco/wkvkKEiMuef6OOZ/Dmn 4kwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=vJOV3h3CX/aPS8y5auejvWc5E9PaYOp7xvDjIVQu70s=; b=d5zsJOwrzVN83Sg+h7zCyLasHz38XvV3PcmGLQ2xsWr4nhyblZesP3TnykWciBame2 lRt3SDaK5qEqLJhXOaQ17OuoY2ASmJNfWUKh4/jnaLUSQRHx/4Coc5Tivbq5FfbeW0DU UK9/AUrrb+3ImNWSFnZCQbX7RS5IePk1RPt26JR13eoAzvo6Hkligl6fhNCI10Fd9m/r jbAwD0ZXsMBbV9EofxDtLSMBDmBkboVMSDTszdy0C/U1RHybpIRra11UdnbYyf0965Wl lrvJ/aP1AIwFmUX3DyiGWwYCPeR9P+PeeXxnPctq4iM6UGN96fTvUmYz6/ECwRAH/PXA A16g== X-Gm-Message-State: AOAM533wFQUjwAPCuVgQloZRlObcxbBlqGpLkLdOe7X+skfwmPvrGm8E GoJ6fGYY+fFVymWwz1ghNSpiFTllLcMiHdnVmm1sNb72aw== X-Google-Smtp-Source: ABdhPJxoQt/BWMmt7sidTaL1WRMJwMkwG6reoyAstJeV97uvrb7yYc/zmnVIDVFRPt+GQLemfwNyNOaj/H9kgXkEJfg= X-Received: by 2002:a5d:4ece:: with SMTP id s14mr2612213wrv.427.1609914436419; Tue, 05 Jan 2021 22:27:16 -0800 (PST) MIME-Version: 1.0 From: Anand N Date: Wed, 6 Jan 2021 11:57:05 +0530 Message-ID: Subject: Issue with echo & source to /dev/stdin To: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary="0000000000001a04fe05b8356ab8" X-Seq: 47798 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: --0000000000001a04fe05b8356ab8 Content-Type: text/plain; charset="UTF-8" Hi All, My zsh has become very slow after upgrading to Mac Big Sur OS. It was nvm that was causing the issue. So I researched and found that nvm can be lazy loaded with the `--no-use` option. However, even after using --no-use, it was still slow. The reason is a simple echo command to /dev/stdin. It is taking >5 seconds. Below are the lines that are causing the issue ``` [ "_$( . /dev/stdin yes 2> /dev/null <<'EOF' [ $# -gt 0 ] && nvm_echo $1 EOF )" = "_yes" ] ``` We noticed that even a very basic echo to /dev/stdin is taking more than 5 seconds. For example ``` time ((echo abc) | (. /dev/stdin)) /dev/stdin:1: command not found: abc ( ( echo abc; ) | ( . /dev/stdin; ); ) 0.00s user 0.00s system 0% cpu 5.087 total ``` This happens only with shell built-in echo and doesn't happen with /bin/echo. We tried many options and a more detailed discussion can be found in the below github issue https://github.com/nvm-sh/nvm/issues/2387 Looking forward to your help. You can directly reply in the github thread. It will help others as well. Thanks, Anand --0000000000001a04fe05b8356ab8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi All,

My zsh has become very slow aft= er upgrading to Mac Big Sur OS.=C2=A0
It was nvm that was causing= the issue. So I researched and found that nvm can be lazy loaded with the = `--no-use` option.

However, even after using --no-= use, it was still slow. The reason is a simple echo=C2=A0command to /dev/st= din. It is taking >5 seconds. Below are the lines that are causing the i= ssue

```
[<= /span> "_$( . /dev/stdin yes = 2> /dev/null <<'EOF'
[ $# -g= t 0 ] && nvm_echo $1
EOF
)" =3D "= _yes" ]
```

We noticed tha= t even a very basic echo to /dev/stdin is taking more than 5 seconds. For e= xample

```
time ((echo abc) | (. /dev/stdin))
/dev/stdin:1: c=
ommand not found: abc
( ( echo abc; ) | ( . /dev/stdin; ); )  0.00s user 0.00s system 0% cpu 5.08=
7 total
```

This happens on= ly with shell built-in echo and doesn't happen with /bin/echo.=C2=A0
We tried many options and a more detailed discussion can be found i= n the below github issue
<= br>
Looking forward to your help. You can directly reply in the g= ithub thread. It will help others as well.

Thanks,=
Anand

--0000000000001a04fe05b8356ab8--