ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kev Jackson <>
Subject Re: Use of reflection in DirectoryScanner to remove duplicated code
Date Thu, 24 Aug 2006 04:13:51 GMT

> > 
> > For additional testing I've created a directory/file structure like
> > 
> > 1/
> >    1 2/
> >     2 3/
> >      3 4/
> so much effort ...

nah, 5 lines of script - I wasn't going to do it manually :)

> I assume you tried some combinations of include/excludes.  Dominique
> used to have a big tree where any change to DirectoryScanner affected
> the runtime of the <sync> task considerably (<sync> needs to scan both
> the source and the dest tree), but that probably was part of another
> live of his.

I wonder if Dominique still has access to that tree, as a real world
tree would be a better test of changes than an artificial construct.
Antoine has mentioned that he would prefer not to use reflection for the
simple reason that some tools cannot show the method graph - in this
particular case I can't see that being a problem as no methods are
called using reflection, I'm only using it to gain access to fields.  I
think in general a change to such a core part of the code *must* be
thoroughly checked/tested for performance issues, so to facilitate this
I've attached the change as a patch (svn diff).  If someone has a
real-world pathological case to try this against I'd love to see the
results of a before-patch/after-patch run.  I'm not considering this
change as possible to go into the trunk until after the release of the
Beta (and probably will be held back for the next release ~1.8)

Thanks for comments so far - here's the patch (it may have tabs in it,
Eclipse on Ubuntu defaults to tabs for some reason, I stripped out the
ones I could find and changed to 4 spaces, but may have missed some)


View raw message