[arch-general] [arch-dev-public] Sharing my repo-tools

Mauro Santos registo.mailling at gmail.com
Sun Apr 11 15:29:30 EDT 2010

On 04/11/2010 08:09 PM, Pierre Schmitz wrote:
> On Sat, 10 Apr 2010 03:13:33 +0200, Pierre Schmitz <pierre at archlinux.de>
> wrote:
>> I have finally put the tools I use to sync my local repo and to create
>> those magic rebuild lists into a git repo. I polished them to increase
>> usability and portability, but they are not really ready to be run e.g.
> on
>> gerolde.
> I just added a simple integrity check for a repo:
> https://git.archlinux.de/repo-tools.git/tree/checkrepo
> Any ideas why writing that md5sums.txt is so slow?

Your inner for loop is slowing everything, I have found that FOR loops
in bash are very slow. If the loop will run only a few times it is ok
but if the intended purpose is to run hundreds of times then it is
better to find an alternative.

Maybe you can try to replace the inner loop with something involving
'find ... -exec something' or some recursive grep and mix it with awk, I
have found that it can be many times faster than using FOR loops.

More information about the arch-general mailing list