[Rpm-maint] [PATCH] Performance improvement of rpmfcSaveArgs
pmatilai at redhat.com
Wed Jan 26 14:42:06 UTC 2011
On 01/15/2011 01:17 PM, Giulio Eulisse wrote:
>> Thanks for spotting this!
> I'm glad to contribute. :)
>> I've not yet had a deeper look how complicated replace
>> the ARGV will be but it definitely worth a try.
> Yep, if you are willing to move away from ARGV that's probably even better.
Yup, ARGV is pretty stupid "data structure", although it is handy for
many things where performance is not that important, and generally
rpmbuild is not considered particularly perfomance critical. However at
three vs two hours just because of in-memory shuffling ... yes its an
issue. It's kinda ironic that the first real performance issue with its
usage comes from the place the whole ARGV-thing was originally written
The rpmfc structures probably want a rewrite at this point really, but I
think I'll add your argvSortedInsert() as a static function within
rpmfc.c until then. That way we dont end up with an unused function in
the public API once the problematic ARGV usage is fixed in rpmfc - there
are other places with similar add+sort loops where it might be useful,
but really anything requiring performance tweaks to ARGV is better off
using a better data structure for the purpose.
Thanks for looking into this and the patch!
- Panu -
More information about the Rpm-maint