delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/06/02/21:27:05

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Message-ID: <429FB310.F17D2674@dessent.net>
Date: Thu, 02 Jun 2005 18:32:00 -0700
From: Brian Dessent <brian AT dessent DOT net>
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: performance problems
References: <4297A14B DOT 9070409 AT plausible DOT org> <20050528131501 DOT V53507 AT logout DOT sh DOT cvut DOT cz> <20050528160424 DOT GB12395 AT trixie DOT casa DOT cgf DOT cx> <429ED094 DOT 9080001 AT tlinx DOT org> <Pine DOT GSO DOT 4 DOT 61 DOT 0506021301320 DOT 10282 AT slinky DOT cs DOT nyu DOT edu> <429FAA40 DOT 1050707 AT tlinx DOT org>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

Linda W wrote:

>         Not everyone can do all things.  I didn't "speculate" on the cause, I
> noticed multiple opens for a program that really only needs stat/lstat I believe.

In order to implement stat(), cygwin has to call NtQueryInformationFile
(GetFileInformationByHandle for 9x/me) and this requires the file to be
opened.  Thus the reason that stat takes forever is that each file has
to be opened, and this is expensive.  I think Cygwin can take several
shortcuts if it knows that not all the stat information is needed (for
example, if it doesn't care if the file is executable or if it has been
told that all files in the directory are to be treated as executable)
but in most cases the file still has to be opened.

>         It's been a while, but if I remember, I tried building it both
> under cygwin(XP) & tried cross-compiling under linux (preferred, as my linux
> box is 3-5x faster).  Perhaps using SuSE (9.1) as my distro causes problem
> as cygwin was originally a Redhat effort?

Why would the distro matter?  All you really need is a working cross
compiler, and the regular build tools (autoconf, automake, perl, awk,
make.)  It's all standard stuff and nothing is redhat-specific.  I build
under a Debian linux system often and it works fine.  The guide to
building a cross compiler in the X users guide is a good source of
instructions.  Note that if you don't also have a mingw cross compiler
you won't be able to build from the toplevel build directory, because
this by default builds all the w32api import libs etc. and this calls
gcc with -mno-cygwin.  You can easily sidestep this requirement by
building in i686-pc-cygwin/winsup/cygwin (or ../utils) instead of the
toplevel build dir.

> remember if I ever ended up with anything useful).  I know the FAQ has
> a rebuild under NT seection, is cygwin buildable on a linux system? :-)

I think you will find that the cygwin DLL (and most of the base system)
you are using now was probably cross-compiled.

Brian

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