Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
slow startup of zsh (1x slower than bash)
- X-seq: zsh-users 23794
- From: Peng Yu <pengyu.ut@xxxxxxxxx>
- To: zsh-users <zsh-users@xxxxxxx>
- Subject: slow startup of zsh (1x slower than bash)
- Date: Mon, 3 Dec 2018 10:27:16 -0600
- 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=w1TRDF8X+RXnvO4ec7jRpM2izPzIXJgDNPjGTkMOlHY=; b=EbsTz2HSV14DL2gf+/+8jRhqCpx/Azgf5BWpi9ywYzybVIAEGR3rYkZob29RQ7007x Zj34eBjaqghZk/az/nQsqgx5k8quoATvxAbHFvz+9eeM89lyMVFm/W/RbCnemSSjJ8gV zwzHA1YXXYmjbqeM8OGhaEJ6irz66Nqk1eegcpAi/Up0ze0IOlzvcKNS55RINXOND5jB CJrnBFo+0j6kQ37dpFkdITsGAevqnx4lPoaPF3Yo0vmRwvz39Kr5I9WFqaZ7Yi5iKDDx l81r3Y8xrrWd6qF0ltZFUvn123uNfZ4sTVkRvJyyTzq500+rrxjTea7AZO3i26XCqe8X gnIA==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hi,
The following example shows that zsh startup time is much slower than
other shells. Can this be improved to at least as fast as bash?
==> main.sh <==
#!/usr/bin/env bash
# vim: set noexpandtab tabstop=2:
set -v
TIMEFORMAT=%R
time for ((i=0;i<100;++i))
do
:
done
time for ((i=0;i<100;++i))
do
./script.sh
done
time for ((i=0;i<100;++i))
do
./script.dash
done
time for ((i=0;i<100;++i))
do
./script.bash
done
time for ((i=0;i<100;++i))
do
./script.ksh
done
time for ((i=0;i<100;++i))
do
./script.zsh
done
==> script.bash <==
#!/usr/local/bin/bash
==> script.dash <==
#!/usr/local/bin/dash
==> script.ksh <==
#!/usr/local/bin/ksh
==> script.sh <==
#!/bin/sh
==> script.zsh <==
#!/usr/local/bin/zsh
$ ./main.sh
TIMEFORMAT=%R
time for ((i=0;i<100;++i))
do
:
done
0.001
time for ((i=0;i<100;++i))
do
./script.sh
done
0.339
time for ((i=0;i<100;++i))
do
./script.dash
done
0.387
time for ((i=0;i<100;++i))
do
./script.bash
done
0.486
time for ((i=0;i<100;++i))
do
./script.ksh
done
0.538
time for ((i=0;i<100;++i))
do
./script.zsh
done
0.953
--
Regards,
Peng
Messages sorted by:
Reverse Date,
Date,
Thread,
Author