X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <48058528.1010605@cisra.canon.com.au> Date: Wed, 16 Apr 2008 14:48:40 +1000 From: Luke Kendall User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Possible Defect: Long delay in some progam executions References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Gregory Rosensteel wrote: > Hello, > I performed a fresh install of cygwin on windows XP. I am seeing > that some commands take a really long time to execute, I was wondering > if anyone else is experience this. For example, the 'which' command > takes 2s while the 'pwd' command runs just fine. Please see my sample > output below and if you have encountered this before, let me know > what's up! > > > $ time which > Usage: which [options] [--] COMMAND [...] > Write the full path of COMMAND(s) to standard output. > > --version, -[vV] Print version and exit successfully. > --help, Print this help and exit successfully. > --skip-dot Skip directories in PATH that start with a dot. > --skip-tilde Skip directories in PATH that start with a tilde. > --show-dot Don't expand a dot to current directory in output. > --show-tilde Output a tilde for HOME directory for non-root. > --tty-only Stop processing options on the right if not on tty. > --all, -a Print all matches in PATH, not just the first > --read-alias, -i Read list of aliases from stdin. > --skip-alias Ignore option --read-alias; don't read stdin. > --read-functions Read shell functions from stdin. > --skip-functions Ignore option --read-functions; don't read stdin. > > Recommended use is to write the output of (alias; declare -f) to standard > input, so that which can show aliases and shell functions. See which(1) for > examples. > > If the options --read-alias and/or --read-functions are specified then the > output can be a full alias or function definition, optionally followed by > the full path of each command used inside of those. > > Report bugs to . > > real 0m2.082s > user 0m0.030s > sys 0m0.000s > > Greg AT laptop1 ~ > $ time pwd > /home/Greg > > real 0m0.001s > user 0m0.000s > sys 0m0.000s > > > pwd is a shell built-in, "which" must be searched for along your $PATH. You could check if any of the early paths in $PATH are network shares (which would obviously be slower). It gets especially bad if some of those network shares drop off the network - you have to wait for a timeout, to proceed to the next $PATH element. luke -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/