From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14300 invoked from network); 7 Jun 2005 23:20:00 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 7 Jun 2005 23:20:00 -0000 Received: (qmail 85133 invoked from network); 7 Jun 2005 23:19:54 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 7 Jun 2005 23:19:54 -0000 Received: (qmail 16533 invoked by alias); 7 Jun 2005 23:19:47 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8979 Received: (qmail 16523 invoked from network); 7 Jun 2005 23:19:46 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 7 Jun 2005 23:19:46 -0000 Received: (qmail 83956 invoked from network); 7 Jun 2005 23:19:46 -0000 Received: from smtp-out-1002.amazon.com (207.171.164.42) by a.mx.sunsite.dk with SMTP; 7 Jun 2005 23:19:41 -0000 X-Amazon-Corporate-Relay: smtp-out-1002.vdc.amazon.com X-AMAZON-TRACK: zsh-users@sunsite.dk Received: from smtp-in-0102.sea3.amazon.com by smtp-out-1002.amazon.com with ESMTP (peer crosscheck: smtp-in-0102.sea3.amazon.com) Received: from ex-gate-01.ant.amazon.com (ex-gate-01.ant.amazon.com [172.20.21.33]) by smtp-in-0102.sea3.amazon.com (8.12.10/8.12.10) with ESMTP id j57NJbNJ018817; Tue, 7 Jun 2005 23:19:37 GMT Received: from [10.21.215.251] ([10.21.215.251]) by ex-gate-01.ant.amazon.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 7 Jun 2005 16:19:36 -0700 In-Reply-To: <2BEEA527-E202-4FC2-BF10-EEF108F473DB@mac.com> References: <200506070926.j579QW1R022316@news01.csr.com> <2BEEA527-E202-4FC2-BF10-EEF108F473DB@mac.com> Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1e7d10fea1822db04c209365d48db60f@mac.com> Content-Transfer-Encoding: 7bit Cc: zsh-users@sunsite.dk From: Chris wong Subject: Re: Avoid LDAP hit during completion Date: Tue, 7 Jun 2005 16:19:44 -0700 To: Chris Wong X-Mailer: Apple Mail (2.622) X-OriginalArrivalTime: 07 Jun 2005 23:19:36.0819 (UTC) FILETIME=[5F12EC30:01C56BB7] X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 Peter, thanks for the xtrace trick. Here is the partial output. The completion slow down (or appeared to be frozen) at _all_labels:39, (boxed up in asterisks below). Any help would be much appreciated. +_description:35> zstyle -a :completion::complete:cd::users ignored-patterns _comp_ignore +_description:38> zstyle -s :completion::complete:cd::users ignore-line hidden +_description:49> (( 1 )) +_description:49> opts=( -F _comp_ignore ) +_description:54> tag=users +_description:56> shift 2 +_description:57> [[ -z user ]] +_description:59> [[ -n '' ]] +_description:63> [[ -n '' ]] +_description:70> [[ -n '' ]] +_description:73> set -A expl -F _comp_ignore -J -default- +_description:77> (( 0 )) +_description:78> zstyle -a :completion::complete:cd::users fake match +_description:88> return 0 ************************************************************************ ** * +_all_labels:39> compadd -F _comp_ignore -J -default- -qS/ -k userdirs * ************************************************************************ ** +_all_labels:26> comptags -A users curtag __spec +_all_labels:43> return __ret +_wanted:9> _tags +_tags:3> local prev +_tags:10> [[ '' == -- ]] +_tags:15> (( 0 )) +_tags:66> comptags -N +_wanted:13> return 1 +_tilde:24> _requested named-directories expl 'named directory' compadd -qS/ -k nameddirs +_requested:3> local __gopt +_requested:5> __gopt=( ) +_requested:6> zparseopts -D -a __gopt 1 2 V J x +_requested:8> comptags -R named-directories +_requested:9> [[ 7 -gt 3 ]] +_requested:10> _all_labels - named-directories expl 'named directory' compadd -qS/ -k nameddirs +_all_labels:3> local __gopt __len __tmp __pre __suf '__ret=1' __descr __spec __prev +_all_labels:5> [[ - == - ]] +_all_labels:6> __prev=- +_all_labels:7> shift +_all_labels:10> __gopt=( ) +_all_labels:11> zparseopts -D -a __gopt 1 2 V J x +_all_labels:13> __tmp=8 +_all_labels:14> __len=7 +_all_labels:15> [[ __tmp -lt __len ]] +_all_labels:18> [[ __tmp -eq 7 ]] +_all_labels:22> __pre=4 +_all_labels:23> __suf=5 +_all_labels:26> comptags -A- named-directories curtag __spec +_all_labels:27> (( 9 > _tags_level )) +_all_labels:28> _tags_level=9 +_all_labels:29> _comp_tags=' local-directories users users named-directories ' +_all_labels:30> [[ named-directories == '*[^\]:*' ]] +_all_labels:37> _description named-directories expl 'named directory' -- Chris On Jun 7, 2005, at 9:27 AM, Chris Wong wrote: > I'll try that today. Unfortunately, it doesn't always freeze up at > the first completion attempt. I though it did for the first time, but > found out otherwise. It may have to do with the caching happening at > the DirectoryService on Mac. It seems to always happen at the worst > possible time such as doing a demo/presentation. :-) > > Thanks > Chris > > On Jun 7, 2005, at 2:26 AM, Peter Stephenson wrote: > >> Chris Wong wrote: >> >>> For some reason, whenever I start a zsh shell, the first completion >>> will trigger many many LDAP lookup. >>> >>> % cd foo >>> >>> As soon as I hit TAB, the shell appears as frozen, but at the >>> background, it's hitting the LDAP server of my company network. This >>> will go one for a couple minutes, at least. tcpdump and top revealed >>> that mystery to me. >>> >> >> Are you using the new completion system (with compinit)? The best way >> of tracking this down would be to see what the completion scripts are >> doing. You can arrange this with >> >> _comp_setup="$_comp_setup >> setopt xtrace" >> >> This produces a huge amount of output so is useless for normal >> completion but you should be able to see where the shell is pausing >> for >> a long time. >> >> -- >> Peter Stephenson Software Engineer >> CSR PLC, Churchill House, Cambridge Business Park, Cowley Road >> Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 >> 692070 >> >> >> ********************************************************************** >> This email and any files transmitted with it are confidential and >> intended solely for the use of the individual or entity to whom they >> are addressed. If you have received this email in error please notify >> the system manager. >> >> ********************************************************************** >> >> >