At 02:01 PM 2/13/2001, [EMAIL PROTECTED] wrote: > > Date: Tue, 13 Feb 2001 13:51:50 -0500 > > From: "Larry Hall (RFK Partners, Inc)" <[EMAIL PROTECTED]> > > > > I know this would only address half the problem but I wonder if it would make > > sense to cache the results of ReadFile() so that separate checks for symbolic > > links and executables would result in only 1 ReadFile() call. This seems > > like a nice general optimization which wouldn't be so "gross"... > >I see three problems with that: > >1) The cache would have to be automatically invalidated whenever the > file is changed, and you'd thus need to check if a file has changed > before using the cache, and those checks would themselves take > time. I'd submit that while this may be true in general, it shouldn't be in the case of symbolic links and executables. These attributes don't really change or, if they do, they change in a very defined way which should make it possible to track. >2) Many of our dependencies are checked over and over again in many > Makefiles by many different Make processes. Thus, either the cache > you propose would have to be global in the Cygwin shared memory > segment, or the checks would still happen over and over for us. Right. Having it in shared memory would be almost a requirement as far as I can see. >3) The implementation of such a global cache would be much more > complex then the simple changes I implemented in only a couple of > hours, and I would argue that this complexity would in fact make > such a cache *more* "gross" than the changes I'm suggesting. I'm not necessarily suggesting this as a replacement for your changes. I'm just trying to think of how this problem could be attacked in general. Whether or not your changes are accepted into the baseline, a general solution would benefit every app. Mostly, I'm just thinking out loud (with the intent of having people poke holes in the idea...) Larry Hall [EMAIL PROTECTED] RFK Partners, Inc. http://www.rfk.com 118 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
Re: Optimizing away "ReadFile" calls when Make calls stat()
Larry Hall (RFK Partners, Inc) Tue, 13 Feb 2001 11:12:37 -0800
- Optimizing away "ReadFile" calls ... Jonathan Kamens
- Re: Optimizing away "ReadFile&quo... Larry Hall (RFK Partners, Inc)
- Re: Optimizing away "ReadFile... jik-cygwin
- Re: Optimizing away "Read... Larry Hall (RFK Partners, Inc)
- Re: Optimizing away "... jik-cygwin
- Re: Optimizing away &... Larry Hall (RFK Partners, Inc)
- Re: Optimizing away "Read... DJ Delorie
- Re: Optimizing away "... jik-cygwin
- Re: Optimizing away &... DJ Delorie
- Re: Optimizing aw... Jonathan Kamens
- Re: Optimizin... DJ Delorie
- Re: Optimizin... Larry Hall (RFK Partners, Inc)
- Re: Optimizing aw... Christopher Faylor
- Re: Optimizin... DJ Delorie