delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/02/13/14:10:14

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: 13 Feb 2001 14:01:31 -0500
Message-ID: <20010213190131.14369.qmail@lizard.curl.com>
From: jik-cygwin AT curl DOT com
To: lhall AT rfk DOT com
CC: cygwin AT cygwin DOT com
In-reply-to: <4.3.1.2.20010213134821.019a7130@pop.ma.ultranet.com>
(lhall AT rfk DOT com)
Subject: Re: Optimizing away "ReadFile" calls when Make calls stat()
References: <4 DOT 3 DOT 1 DOT 2 DOT 20010213134821 DOT 019a7130 AT pop DOT ma DOT ultranet DOT com>

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019