zsh-workers
 help / color / mirror / code / Atom feed
* Issue with echo & source to /dev/stdin
@ 2021-01-06  6:27 Anand N
  2021-01-06 16:40 ` Bart Schaefer
  2021-01-06 16:48 ` Bart Schaefer
  0 siblings, 2 replies; 5+ messages in thread
From: Anand N @ 2021-01-06  6:27 UTC (permalink / raw)
  To: zsh-workers

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

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

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-06 20:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-06  6:27 Issue with echo & source to /dev/stdin Anand N
2021-01-06 16:40 ` Bart Schaefer
     [not found]   ` <CAH=D2ePreSUi9VSDqZsXVjAJZbte5ui5c60BMvERRK4gCiZnbA@mail.gmail.com>
2021-01-06 17:10     ` Fwd: " Anand N
2021-01-06 20:41       ` Bart Schaefer
2021-01-06 16:48 ` Bart Schaefer

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).