Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: "Once-a-day" long delay before startup

Hi, I have pretty much the same issue, the first login after boot, to each user take about 8-9s.

In order to check whats going on I changed my login shell to bash and did:

zsh -x 2>&1 | tee zsh-startup.log

In order to save logs and I careful watch what pop up onto screen. I have reproduced it few times, what you need to reproduce is reboot system or drop_cache (echo 3 > /proc/sys/vm/drop_caches) and then again run zsh as user.

What I see in the log is lot of things, then last few lines *before* this big lag is:

+compaudit:59> [[ -n /usr/share/zsh/4.3.12/functions/Calendar ]]
+compaudit:60> [[ 668 -lt 20 || /usr/share/zsh/4.3.12/functions/Calendar == */Base || -d /usr/share/zsh/4.3.12/functions/Calendar/Base ]]
+compaudit:81> [[ ask == use ]]
+compaudit:89> local GROUP GROUPMEM _i_pw _i_gid _i_ulwdirs
+compaudit:90> (( UID == EUID  ))

after that it take about 7-8s of nothing and then:

+compaudit:91> getent group slashbeast
+compaudit:91> IFS=: +compaudit:91> read GROUP _i_pw _i_gid GROUPMEM
+compaudit:106> [[ '' == slashbeast ]]
+compaudit:110> _i_wdirs=( )
+compaudit:114> [[ -f /etc/debian_version ]]
+compaudit:120> _i_wdirs=( )
+compaudit:121> _i_wfiles=( )
+compaudit:123> case 0:0 (0:0)
+compaudit:124> _i_q=''
+compaudit:130> [[ -n '' ]]
+compaudit:137> return 0
+compinit:463> autoload -Uz compdump compinstall

Now I can re-start zsh and it will start in less than 1s. Until I drop cache, reboot or log as new user with zsh.

Also I have another system with exact the same zsh config, but there zsh start much quicker, 3-4s, which is really odd because the box with 'slowest' zsh is many times better.

Anyone have idea whats going on?

-- Piotr

Messages sorted by: Reverse Date, Date, Thread, Author