On Fri, Aug 21, 2009 at 9:46 AM, Dale Anson <dan...@grafidog.com> wrote:

> Does your change improve performance of the delete task at all?  I recently
> replaced many of the calls to delete in our build files with an exec call to
> rm, since profiling showed the delete task was responsible for over 50% of
> the total time of the build.  Part of the problem is the way delete is
> implemented in Java itself, that is, a non-empty directory cannot be deleted
> with java.io.File.delete(), so the delete task is required to traverse the
> tree and delete files from the bottom up.
>

Just a minor point of clarification here... the rm(1) command also must
delete all the files in a directory before deleting the directory itself;
the rmdir(2) system call requires this. So that is not an explanation for
the difference in speed between Java and C.

-Archie

-- 
Archie L. Cobbs

Reply via email to