[pacman-dev] [PATCH] makepkg: parallelize integrity checks

Allan McRae allan at archlinux.org
Sat Apr 23 02:22:13 EDT 2011


On 23/04/11 02:16, Dan McGee wrote:
> This enables parallel integrity checks in makepkg within a given family
> of integrity sums. Subshell jobs for each source file are kicked off and
> run in parallel, and then we wait for each of them in turn to complete
> and print the same information as before.
>
> Note that programming sense says this loop should be done differently
> for filesystem access reasons; doing all checks for a given file would
> make more sense rather than running through the filelist multiple times.
> However, that would be a very different patch than what this is trying
> to accomplish.
>
> On a completely suited for the task PKGBUILD containing md5sums ans
> sha256sums of several large data files, as well as a failing integrity
> check so, this brings execution time way down:
>
>       $ time makepkg -f 2>/dev/null
>       real	0m7.924s
>       user	0m7.293s
>       sys	0m0.480s
>
>       $ time ~/projects/pacman/scripts/makepkg -f 2>/dev/null
>       real	0m2.447s
>       user	0m7.470s
>       sys	0m0.537s
>
> Signed-off-by: Dan McGee<dan at archlinux.org>


Ack.  I guess we should also do the same for generating the checksums 
with "makepkg -g".

Allan



More information about the pacman-dev mailing list