delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/27/18:43:56

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Tue, 27 Jan 2004 16:05:28 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: pd <pdzierza AT poczta DOT onet DOT pl>
cc: cygwin AT cygwin DOT com
Subject: Re[3]: 'bash --login -i' takes 9 secs !
In-Reply-To: <17196412502004-0127213512!poczta.onet.pl>
Message-ID: <Pine.GSO.4.56.0401271541030.14952@slinky.cs.nyu.edu>
References: <128150614682004-0127201852!poczta.onet.pl> <Pine DOT GSO DOT 4 DOT 56 DOT 0401271434550 DOT 14952 AT slinky DOT cs DOT nyu DOT edu> <Pine DOT GSO DOT 4 DOT 56 DOT 0401271442030 DOT 14952 AT slinky DOT cs DOT nyu DOT edu> <169177317962004-0127210323!poczta.onet.pl> <Pine DOT GSO DOT 4 DOT 56 DOT 0401271507510 DOT 14952 AT slinky DOT cs DOT nyu DOT edu> <17196412502004-0127213512!poczta.onet.pl>
MIME-Version: 1.0

On Tue, 27 Jan 2004, pd wrote:

> Tuesday, January 27, 2004, 9:09:36 PM, you wrote:
>
> IP> Now you 'strace' both calls to see where the time goes (each gives about
> IP> 300 lines of strace and, FWIW, each takes <.2s on my Win2k machine).
>
> In both cases (uname and hostname) the problem is with
> cygwin_gethostname: name 103baran
>
> Almost all the time goes there.
> Perhaps some network configuration issue, but, hmmm, figuring
> this out won't be easy (I have novell client, mounted samba shares, dns,
> netbios...)
> Anything else I could try?

Well, cygwin_gethostname is mostly a wrapper around GetComputerName,
IIUC...  Try running the following little script (assumes you have the
"make", "gcc", "gcc-mingw", and "w32api" packages installed):

cat > testGCN.c << EOF
#include <windows.h>
#include <stdio.h>
int main(int ac, char *av[]) {
  DWORD len = 80;
  char name[len];
  if (!GetComputerNameA(name, &len))
    return 1;
  fprintf(stderr, "Got name: '%s'\n", name);
  return 0;
}
EOF
make CC='gcc -mno-cygwin' testGCN
time ./testGCN

If the time it outputs is consistent with what you've been seeing, try
asking on a Windows forum, as this is not a Cygwin problem at all.
Otherwise, you'll need to figure out what else can cause the slowdown.
Does your machine use a DHCP connection?  Does "ipconfig /all" also take a
long time?  In the worst case you may have to build a debuggable version
of cygwin1.dll and spend some time with gdb...
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019