public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Possible Defect: Long delay in some progam executions
@ 2008-04-15 22:23 Gregory Rosensteel
  2008-04-16  3:48 ` Eric Blake
  2008-04-16  6:16 ` Luke Kendall
  0 siblings, 2 replies; 3+ messages in thread
From: Gregory Rosensteel @ 2008-04-15 22:23 UTC (permalink / raw)
  To: cygwin

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 <which-bugs@gnu.org>.

real    0m2.082s
user    0m0.030s
sys     0m0.000s

Greg@laptop1 ~
$ time pwd
/home/Greg

real    0m0.001s
user    0m0.000s
sys     0m0.000s




My environment:

$ set
!::='::\'
!C:='C:\cygwin\bin'
ALLUSERSPROFILE='C:\Documents and Settings\All Users'
APPDATA='C:\Documents and Settings\Greg\Application Data'
ASLOGDIR='C:\Program Files\Intuit\QuickBooks 2006\'
BASH=/usr/bin/bash
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="3" [1]="2" [2]="33" [3]="18" [4]="release"
[5]="i686-pc-cygwin")
BASH_VERSION='3.2.33(18)-release'
CLASSPATH='.;C:\Program Files\Java\jre1.6.0_03\lib\ext\QTJava.zip'
COMMONPROGRAMFILES='C:\Program Files\Common Files'
COMPUTERNAME=LAPTOP1
COMSPEC='C:\WINDOWS\system32\cmd.exe'
CVS_RSH=/bin/ssh
DIRSTACK=()
EUID=1005
FP_NO_HOST_CHECK=NO
GROUPS=()
HISTFILE=/home/Greg/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/home/Greg
HOMEDRIVE=C:
HOMEPATH='\Documents and Settings\Greg'
HOSTNAME=laptop1
HOSTTYPE=i686
IFS=$' \t\n'
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:
LOGONSERVER='\\LAPTOP1'
MACHTYPE=i686-pc-cygwin
MAILCHECK=60
MAKE_MODE=unix
MANPATH=/usr/local/man:/usr/share/man:/usr/man::/usr/ssl/man:/usr/share/qt3/doc/man:/usr/X11R6/man
NUMBER_OF_PROCESSORS=2
OLDPWD=/usr/bin
OPTERR=1
OPTIND=1
OS=Windows_NT
OSTYPE=cygwin
PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
PATHEXT='.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
PIPESTATUS=([0]="0")
PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig
PPID=1
PRINTER='HP Color LaserJet 2605dn_2605dtn PS'
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER='x86 Family 6 Model 15 Stepping 6, GenuineIntel'
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0f06
PROGRAMFILES='C:\Program Files'
PROMPT='$P$G'
PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
PS2='> '
PS4='+ '
PWD=/home/Greg
QMAKESPEC=/usr/lib/qt3/mkspecs/cygwin-g++
QTDIR=/usr/lib/qt3
QTJAVA='C:\Program Files\Java\jre1.6.0_03\lib\ext\QTJava.zip'
RR='C:\Program Files\Lenovo\Rescue and Recovery'
SESSIONNAME=Console
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHLVL=1
SONICCENTRAL='C:\Program Files\Common Files\Sonic Shared\Sonic Central\'
SWSHARE='C:\SWSHARE'
SYSTEMDRIVE=C:
SYSTEMROOT='C:\WINDOWS'
TEMP=/cygdrive/c/DOCUME~1/Greg/LOCALS~1/Temp
TERM=cygwin
TEXDOCVIEW_dvi='cygstart %s'
TEXDOCVIEW_html='cygstart %s'
TEXDOCVIEW_pdf='cygstart %s'
TEXDOCVIEW_ps='cygstart %s'
TEXDOCVIEW_txt='cygstart %s'
TMP=/cygdrive/c/DOCUME~1/Greg/LOCALS~1/Temp
TVT='C:\Program Files\Lenovo'
TVTCOMMON='C:\Program Files\Common Files\Lenovo'
TVTPYDIR='C:\Program Files\Common Files\Lenovo\Python24'
UID=1005
USER=Greg
USERDOMAIN=LAPTOP1
USERNAME=Greg
USERPROFILE='C:\Documents and Settings\Greg'
WINDIR='C:\WINDOWS'
_=pwd
f=

--
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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Possible Defect: Long delay in some progam executions
  2008-04-15 22:23 Possible Defect: Long delay in some progam executions Gregory Rosensteel
@ 2008-04-16  3:48 ` Eric Blake
  2008-04-16  6:16 ` Luke Kendall
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2008-04-16  3:48 UTC (permalink / raw)
  To: cygwin, grosensteel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Gregory Rosensteel on 4/15/2008 1:46 PM:
| 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!

Windows is notoriously slow at path searching (particularly if there is a
network path or heavily populated directory encountered during the search)
and process spawning (at least, when emulating fork on top of windows
API).  Remember, 'pwd' is a shell builtin, while 'which' is an external
executable, so in your example, you are only doing a PATH search for
'which'.  One other thing to check is if you have any
http://cygwin.com/acronyms/#BLODA interfering with process creation.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgFQDsACgkQ84KuGfSFAYAVRgCgzzz9ftmH9HZxDvx+pi7YCeSK
UOQAn3c1dLKPTePs6Wso0T0QgJwDdtBS
=jiU6
-----END PGP SIGNATURE-----

--
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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Possible Defect: Long delay in some progam executions
  2008-04-15 22:23 Possible Defect: Long delay in some progam executions Gregory Rosensteel
  2008-04-16  3:48 ` Eric Blake
@ 2008-04-16  6:16 ` Luke Kendall
  1 sibling, 0 replies; 3+ messages in thread
From: Luke Kendall @ 2008-04-16  6:16 UTC (permalink / raw)
  To: cygwin

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 <which-bugs@gnu.org>.
>
> real    0m2.082s
> user    0m0.030s
> sys     0m0.000s
>
> Greg@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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-16  4:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-15 22:23 Possible Defect: Long delay in some progam executions Gregory Rosensteel
2008-04-16  3:48 ` Eric Blake
2008-04-16  6:16 ` Luke Kendall

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 read-only IMAP folder(s) and NNTP newsgroup(s).