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

Dan McGee dpmcgee at gmail.com
Sat Apr 23 12:42:59 EDT 2011


On Sat, Apr 23, 2011 at 1:22 AM, Allan McRae <allan at archlinux.org> wrote:
> 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".

We could- I didn't do it because:
* this one would be a lot trickier (we need to somehow return a
checksum string, not just a return code)
* in theory this is done less than checking and extraction

-Dan


More information about the pacman-dev mailing list