This is the mail archive of the cygwin@sources.redhat.com 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]

Re: Optimizing away "ReadFile" calls when Make calls stat()


>  Date: Tue, 13 Feb 2001 13:51:50 -0500
>  From: "Larry Hall (RFK Partners, Inc)" <lhall@rfk.com>
>  
>  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.

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.

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.

jik

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


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