Trent W. Buck wrote:
> Using Darcs, etckeeper pre-commit was annoyingly slow.  Profiling
> pre-commit.d, I found about 3s were spent running readlink(1) on each
> link in /etc/, though there were only 590 links.
> 
> Fortunately, GNU find supports -printf, so readlink(1) isn't required.
> Similarly, the stat(1) per chown/chmod/chgrp entry isn't required.
> 
> Finally, I wanted .etckeeper to ignore backup~ files.  I added -name
> \*~ -o to $NOVCS, which required turning it into a wrapper function.
> Ugly, but at least it's applied consistently to all find(1) calls
> (cf. filter_ignore).  I threw in an -O2 for the hell of it.
> 
> Before:
> 
>     # time sh -c 'etckeeper pre-commit; etckeeper pre-commit; etckeeper 
> pre-commit'
> 
>     real    0m10.402s
>     user    0m1.200s
>     sys     0m2.536s
> 
> After:
> 
>     # time sh -c 'etckeeper pre-commit; etckeeper pre-commit; etckeeper 
> pre-commit'
> 
>     real    0m2.770s
>     user    0m1.284s
>     sys     0m1.500s
> 
> Feel free to WONTFIX this if you have a "no GNUisms" policy.

I heard just today from someone using etckeeper on Solaris.
I don't remember if GNU find is available there by default.

> +             # FIXME: NO LONGER OMITS .darcsignore MATCHES.
> +             # Why was it done only for THIS find, anyway?

It should be done for all the finds, AFAICS.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to