From mboxrd@z Thu Jan 1 00:00:00 1970 From: DJ Delorie To: jik-cygwin@curl.com Cc: cygwin@cygwin.com Subject: Re: Optimizing away "ReadFile" calls when Make calls stat() Date: Tue, 13 Feb 2001 11:54:00 -0000 Message-id: <200102131954.OAA09284@envy.delorie.com> References: <4.3.1.2.20010213134821.019a7130@pop.ma.ultranet.com> <20010213190131.14369.qmail@lizard.curl.com> <200102131935.OAA09136@envy.delorie.com> <20010213194612.17311.qmail@lizard.curl.com> X-SW-Source: 2001-02/msg00688.html > As I've noted separately, reading tens of thousands of files even once > incurs a significant performance penalty. True, but reading them all once is better than reading them all twice. I'm trying to break the problem down into small enough changes that we actually have a chance of implementing them. > The change I've proposed can eliminate reading them at all. But not in a way that we can make it the default. Perhaps you could propose a set of mount flags to optimize common situations? We already have one to avoid the read-for-execute test, perhaps you could work on an assume-no-symlinks flag? Then we wouldn't need a custom make.exe (or any other program). > But it does nothing at all for the "usual case" I'm trying to > optimize, which is Make stat()ing a file but never reading it. It does, because stat() reads the file twice, once to see if it's a symlink, and once to see if the executable bit needs to be set. > > These should be easier wins (thus, more doable) than a global cache, > > which NT should be providing itself as part of the disk cache > > subsystem (for local drives, at least). I don't think it's > > appropriate for cygwin to go beyond this anyway - too many race > > conditions arise. > > As far as I know, there are no race conditions in the change I > suggested. In fact, it *removes* race conditions, since it reduces > the number of distinct OS operations that must be performed on a file > during stat(). Right, but others were suggesting a global cache of file bytes. *That* would introduce race conditions. -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple