performance problems

Brian Dessent brian@dessent.net
Fri Jun 3 01:26:00 GMT 2005


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/



More information about the Cygwin mailing list