help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: directories to check?


From: Paul D. Smith
Subject: Re: directories to check?
Date: Fri, 16 Sep 2005 11:26:53 -0400

%% Torsten Mohr <address@hidden> writes:

  tm> I still think this may be a good idea to speed things up:

  >> > Make could then first read all the hint-directory contents and
  >> > their timestamps and then use these informations as a "cache".
  >> >
  >> >
  >> > Would that be possible?
  >> >
  >> > Would that be an improvement?
  >> >
  >> > Is something like this maybe already available and i just haven't
  >> > yet seen it?

  tm> Is the effort to implement this big?  Is it a major architecture
  tm> change?

I guess I don't really understand your suggestion.

There's no UNIX operation to "bulk retrieve" stat information about a
whole directory of files, that is "extra fast" or something.  Regardless
of whether you do it early or late, you're going to be running stat on
the same number of files (actually, maybe even more files with your
method as you'll stat the whole directory even though make might end up
caring about only a few files in it).  It will take the same amount of
time.

Also, note that GNU make already does cache directories and stat info to
the extent that it's possible to do so without impacting its
functionality... in fact there are a number of bug reports that this
caching causes some makefiles that work properly in other versions of
make to not work as expected with GNU make.


I'm frankly skeptical that the "startup time" you refer to has anything
at all to do with this.  Have you done any profiling of the make process
to see where it's spending all of its time?

Note that some kinds of string operations, in some situations, can be
very inefficient.  Some of these things were worked on a bit in the
current beta release; give this a whirl:

    ftp://alpha.gnu.org/gnu/make/make-3.81beta3.tar.gz

and see if it's any better.  If not you'll need to do some profiling.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]