zsh-users
 help / color / mirror / code / Atom feed
From: Piotr Karbowski <jabberuser@gmail.com>
To: zsh-users@zsh.org
Subject: Re: "Once-a-day" long delay before startup
Date: Fri, 19 Aug 2011 00:08:16 +0200	[thread overview]
Message-ID: <4E4D8D50.5040800@gmail.com> (raw)
In-Reply-To: <20110814145749.GA6341@andrew.cmu.edu>

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


  parent reply	other threads:[~2011-08-18 22:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-14 14:57 gi1242+zsh
2011-08-14 15:36 ` Vincent Lefevre
2011-08-14 17:32   ` Vincent Lefevre
2011-08-14 18:06 ` Bart Schaefer
2011-08-18 22:08 ` Piotr Karbowski [this message]
2011-08-19  2:03   ` gi1242+zsh
2011-08-19  4:05     ` Bart Schaefer
2011-08-19  9:08       ` Vincent Lefevre
2011-08-19 17:58         ` Bart Schaefer
2011-08-20  0:47       ` gi1242+zsh
2011-08-20  7:01         ` Bart Schaefer
2011-08-19  3:52   ` Bart Schaefer
2011-08-19  8:36     ` Vincent Lefevre
2011-08-19  9:05     ` Piotr Karbowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E4D8D50.5040800@gmail.com \
    --to=jabberuser@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).