cons-discuss
[Top][All Lists]
Advanced

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

Re: Suggestion about derived files and commands


From: Frank Thomas
Subject: Re: Suggestion about derived files and commands
Date: Fri, 27 Apr 2001 09:43:44 +0200

Am Freitag, 27. April 2001 um 04:39 schrieb Rajesh Vaidheeswarran:
So, would it be possible (or a good idea) to modify cons so that cons
keeps somewhere a hash for each derived file:
- the key would be made of the signature as explained above
- the value would be made of the signature of the object file.

So that when cons considers to rebuild a derived file, it would:
- compile the expected signature as usual
- check if a key exists in the hash for that expected signature
- if no -> rebuild
- if yes, compute the signature of the current object file (or
  retrieve a stored value) and compare it with the value stored in the
  hash.
- if the 2 signatures of the object files match -> no rebuild
- if the 2 signatures of the object files don't match -> rebuild

This way, unnecessary rebuild of derived file could be avoided.

In fact, this mechanism is very close to the mechanism used by the
memoize module. (See http://search.cpan.org/search?dist=Memoize)

Very good,

this seems to me like a very good idea!

Bye
        Frank



reply via email to

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