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()



> I see three problems with that:
> 
> 1) The cache would have to be automatically invalidated whenever the
> 2) Many of our dependencies are checked over and over again in many
> 3) The implementation of such a global cache would be much more

I think an easier win would be to cache the bytes read within the
fhandler, not globally, so while each fhandler (i.e. open, stat,
whatnot) would still need to read the file itself, it would never need
to read it more than once.

If we still need more performance, perhaps a one-entry cache of the
most recent file accessed (and when) could be added, and ignored if
the data is more than, say, one second old.  Even if it were local to
one process, it would hit most of the usual cases (stat a file, alloc
a buffer, then open/read the file).

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.

--
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]