On 23 Aug 2006, at 11:38, Stefan Bodewig wrote:
On Wed, 23 Aug 2006, Kev Jackson <[EMAIL PROTECTED]> wrote:
I want to run this by people here to see what people think of this.
Basically DirectoryScanner has some duplicated code [
accountForIncludedFile, accountForIncludedDir ], I think I have a
refactored processIncluded method that can replace the duplication,
but it relies on using Reflection to get access to the classes
fields and then does the work [1].
Please run some tests on really large directory trees,
DirectoryScanner is probably the class with the biggest impact on
perceived Ant performance. We shouldn't do anything that makes it
significantly slower.
Ok, well I've just run the DirectoryScannerTest embedded in eclipse
JUnit runner, and there is no difference in performance at all
between using the original code and the modified code
original 2.778 seconds to run 27 tests
modified 2.734 seconds to run 27 tests
This is using Suns jsdk 1.5. I'm not sure how I can test using
'really large directory trees'. The modified code is only run inside
scandir (which I know is a major part of the directory scanner). I
guess you worry not about having loads of files, but in the case
where there is a massively nested directory tree - I'll have to
create a pathological case to test this though.
Kev
--
"That government is best which governs not at all" - Henry Thoreau
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]