I have a more interesting approach.  Strategy pattern ladies and
gentleman.  Create a DependencyAnalysisStrategy interface.
Supply the original dependency analysis as the default one, and
provide Helge's as an additional one.  Then the user could potentially
plug in his/her own strategy for dependency analysis:

public interface DependencyAnalysisStrategy {
   // Fill in interface here

public class DefaultDepAnalysisStrategy {
   // Fill in

public class EnhancedDepAnalysisStrategy {
   // Fill in

<cc ....
    dependencyanalysis="EnhancedDepAnalysisStrategy" />

Does this make sense?  That way people could pick and
choose when they wanted to use what strategy.

Matthew Inger [inger@synygy.com]
Software Developer
Synygy, Inc
610-664-7433 x 7770
"Man who jump off cliff, leap to conclusions." - Confucious

-----Original Message-----
From: Helge Schulz [mailto:Helge.Schulz@gmx.net]
Sent: Friday, August 29, 2003 1:23 PM
To: Dominique Devienne
Cc: 'Curt Arnold'; ant-contrib-developers@lists.sourceforge.net;
OpenSHORE development
Subject: [Ant-contrib-developers] Re: Patch: cpptasks dependency
analysis up to 1000 times faster

On Thu, 28 Aug 2003, Dominique Devienne wrote:
> This is what I've seen from applying the patch, in one of my projects,
> with 1569 .cpp, 1944 .h, 48 .hpp, so a good size project already, totaling
> 1,178,784 lines of code (including comments).
>                      First Full Analysis    Subsequent Analysis
> Official CppTasks:     63 seconds +/- 2       24 seconds +/- 1
> Patched  CppTasks:     61 seconds +/- 0       19 seconds +/- 1
> Note that this timing is the full build time, including Ant startup, and
> recursing the directory tree, since the projects is composed of 30+ libs,
> as well deciding that 423 Java files are up to date.
> Compare this to the full time to build (a few seconds taken by Java
> compile): 21 minutes 28 seconds.

OpenSHORE (http://sf.net/projects/openshore) has 321 .cpp, 419 .h and 249
.java source files. It has 210,571 lines of code (including comments).
Here are my timings for the whole project (27 C++ libs, without Java

                     First Full Analysis    Subsequent Analysis
Official CppTasks:    271 seconds +/- 2      268 seconds +/- 0
Patched  CppTasks:      7 seconds +/- 1        6 seconds +/- 0

Full rebuild (target shore-server): 9 minutes 57 seconds.

> So all in all, I'm seeing very little benefit from this myself.

Ok, but you have no slow down.

> The project I've tested the patch against is very mature, and has very
> few headers including unnecessary headers (forward prototyping of
> everything used as pointers/references).

Headers of OpenSHORE contains many C++ template implementations, so simple
forward declarations aren't possible.

> That's certainly not 1000 times faster :(

Better then slow down :-)


Helge Schulz    http://www.openshore.org

This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
Ant-contrib-developers mailing list