From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23198 invoked by alias); 20 Aug 2011 00:47:25 -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: 16272 Received: (qmail 12513 invoked from network); 20 Aug 2011 00:47:24 -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=-3.3 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received-SPF: neutral (ns1.primenet.com.au: 128.2.11.61 is neither permitted nor denied by SPF record at _spf.google.com) Date: Fri, 19 Aug 2011 20:47:10 -0400 From: gi1242+zsh@gmail.com To: Bart Schaefer Cc: zsh-users@zsh.org Subject: Re: "Once-a-day" long delay before startup Message-ID: <20110820004710.GA4085@andrew.cmu.edu> Mail-Followup-To: gi1242+zsh@gmail.com, Bart Schaefer , zsh-users@zsh.org References: <20110814145749.GA6341@andrew.cmu.edu> <4E4D8D50.5040800@gmail.com> <20110819020336.GA21062@andrew.cmu.edu> <110818210558.ZM20788@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <110818210558.ZM20788@torch.brasslantern.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-PMX-Version: 5.5.9.388399, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.3.18.170322 X-SMTP-Spam-Clean: 33% ( RDNS_SUSP_FORGED_FROM 3.5, FORGED_FROM_GMAIL 0.1, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_LESS 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, BODY_SIZE_700_799 0, NO_REAL_NAME 0, RDNS_BROADBAND 0, RDNS_GENERIC_POOLED 0, RDNS_POOLED 0, RDNS_SUSP 0, RDNS_SUSP_GENERIC 0, RDNS_SUSP_SPECIFIC 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CD 0, __CT 0, __CT_TEXT_PLAIN 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __PHISH_SPEAR_STRUCTURE_1 0, __RDNS_BROADBAND_5 0, __RDNS_POOLED_11 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __USER_AGENT 0) X-SMTP-Spam-Score: 33% X-Scanned-By: MIMEDefang 2.60 on 128.2.11.61 On Thu, Aug 18, 2011 at 09:05:58PM -0700, Bart Schaefer wrote: > } > } I've no idea why "which dircolors" takes such a long time on zsh (when > } the cache is cleared), and runs instantly on sh. I'd appreciate any > } help. > > sh doesn't do command hashing, it re-searches the path every time. > > Refer to my earlier reply -- do as soon as possible during startup: > > unsetopt hashcmds hashdirs hashlistall > > On my system "zsh -fc 'which ...'" takes about 40% as long with those > options unset as it does with them set. Indeed. Even with unsetopt hashcmds hashdirs zsh starts quickly. I'm not sure how this problem can be solved (if at all). GI -- Freedom of speech is wonderful - right up there with the freedom not to listen.