Ticket #92 (new defect)

Opened 2 years ago

Last modified 2 years ago

[PATCH] massive speed up to pythondeps.sh

Reported by: ajax Assigned to: pmatilai
Priority: major Milestone:
Component: rpm Version: RPM Development
Keywords: Cc: lmacken@redhat.com, dmalcolm@redhat.com

Description

pythondeps.sh is run once for each python-colored file in the payload. It invokes python every time it's run, to figure out the python version number. This is... not the fastest thing ever. Attached patch adds %pyver (with a bit of a clever hack to evaluate it either zero times if it's never referenced, or exactly once), and passes it to pythondeps.sh as the second argument.

Tested locally with 'make local' of bodhi from Fedora CVS. Takes build time down from ~24 seconds to ~13 on a 2.6GHz Core 2 Duo.

This is still lame, of course. rpmdeps should be handed a list of files from xargs in %deploop, and then each color dep handler should take a list of files in argv in the same way. This would require that rpmdeps (and rpmfcHelper() and friends) be internally extended to handle lists of files instead of single files.

Attachments

rpm-dep-speedup.patch (1.9 kB) - added by ajax on 09/01/09 18:56:21.

Change History

09/01/09 18:56:21 changed by ajax

  • attachment rpm-dep-speedup.patch added.

11/24/09 15:57:10 changed by ajax

So I don't forget it:

<Panu> what I'd prefer over a a pyver specific hack is a mechanism that could
       be used for any similar case - kind of "lazy %global"

05/06/10 14:42:20 changed by lmacken

  • cc set to lmacken@redhat.com, dmalcolm@redhat.com.