As part of trying to optimize my build, I have been trying to figure out how 
much time was spent by the up-to-date checks of inputs/outputs for each task.  
I just realized that tasks which are actually executed, but which set the 
didWork flag to false are marked as UP-TO-DATE.  I can't distinguish between 
tasks where execution was skipped and tasks which are executed, but didn't end 
up doing anything.

Should tasks that do no work be marked as skipped and up-to-date?  They aren't 
really skipped, should they really be marked that way?  If they are marked as 
skipped, can we use another skip message to distinguish the two cases?

AbstractTask.setDidWork was never promoted to the Task interface.  I think 
perhaps it should be.  I'm setting this now from some DefaultTasks, but hadn't 
realized that this is not really public.

If I can distinguish better between input/output checking and tasks that did no 
work, I might have some better numbers, but it looks to me like a good portion 
of my build is spent doing the input/output up-to-date checks.  This is 
particularly expensive for tasks whose inputs are configurations that contain 
large numbers of jars.  Hashing the contents of large files like this is 
expensive.  I think it would be nice to be able to choose another strategy for 
these checks (like comparing modification times and file size).  I understand 
that when working with certain version control systems, modification times may 
be unreliable, but for people not using those systems a hash seems overly slow. 
 I may try this on my build to see how much it improves.

Lastly, I think that the order of steps inside 
DefaultTaskArtifactStateRepository.isUpToDate might be optimized.  I think it 
is typical for tasks to have more inputs than outputs and outputs are the items 
typically removed when cleaned.  Currently it looks like the hashes for all the 
inputs are computed even after a clean build.   If checkOutputs was done before 
checkInputs, I think it might generally be faster.

I'll be glad to make any of these changes that seem appropriate, but wanted 
some feedback first.

--
Steve Appling
Automated Logic Research Team





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to