From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4066 invoked by alias); 18 Aug 2011 22:08:53 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16264 Received: (qmail 21161 invoked from network); 18 Aug 2011 22:08:42 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.161.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=FOHSr5Qj5T8Z/v2J7k90+NaYEihsPcgI2IrrzehZIXQ=; b=fOf1BID39a9lhIPX4xGg64X8CDKQKrsaIUeJACWTqcGWKLcrcl74kwgwy/J+9182YE BJe71zcqY0uo2iHaC1v8IFmJBiPcKNvq2fjodbC272Om8Nyal9kW0R3DGGMQ87N8KKIJ OwNsKpiErWO6BIb4VewtuaGBY+SGbmajKKatA= Message-ID: <4E4D8D50.5040800@gmail.com> Date: Fri, 19 Aug 2011 00:08:16 +0200 From: Piotr Karbowski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110816 Thunderbird/5.0 MIME-Version: 1.0 To: zsh-users@zsh.org Subject: Re: "Once-a-day" long delay before startup References: <20110814145749.GA6341@andrew.cmu.edu> In-Reply-To: <20110814145749.GA6341@andrew.cmu.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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