This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin Filesystem Performance degradation 1.7.5 vs 1.7.7, and methods for improving performance


Hi,

> If it's known that the application doesn't ever use the "heavy" parts of
> stat() in any of its code, then substituting xstat() for stat() globally
> only needs to happen once in the code as well.

It needs to be replaced in the following places:
- detection code added in autoconf
- define in a header
#ifdef HAVE_XSTAT
#define STRUCT_FAST_STAT struct xstat
#define FAST_STAT(...) xstat(__VA_ARGS__)
#else
#define STRUCT_FAST_STAT struct stat
#define FAST_STAT(...) stat(__VA_ARGS__)
#endif

And now need to search/replace in every single file where 'struct stat' and 'stat()' appear to change them to STRUCT_FAST_STAT, and FAST_STAT()

This is a BIG change.

And the problem is that it does not have a GLOBAL effect on the program. It only affects the code compiled directly, not the code linked together with the application. So if a program uses libraries (/lib/libxxx.a or /lib/libxxx.so), the above will not affect the libs the program uses.

Derry

On 9/29/2010 10:13 PM, Larry Hall (Cygwin Developers) wrote:
On 9/29/2010 3:25 PM, Derry Shribman wrote:
Hi,

Q) how much code needs to be modified to get this to work?
A) just add
#ifdef __CYGWIN__
setenv("CYGWIN", "no_ino no_nlink");
#endif
In the code. ONCE!

If it's known that the application doesn't ever use the "heavy" parts of stat() in any of its code, then substituting xstat() for stat() globally only needs to happen once in the code as well.

So it sounds to me like if xstat existed right now in Cygwin, you'd be just
as content with it for application use as some Cygwin-specific environment
variable. Or was there another point for application use that I missed?



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]