pkg-config performance with >= 15 dependency chain

Dan Nicholson dbn.lists at gmail.com
Wed Jun 19 17:39:19 PDT 2013


On Jun 19, 2013 2:46 PM, "Sean Byland" <seanb at cray.com> wrote:
>
> I built a version of pkg-config 0.28 (rather than using the older default
shipped with the OS, 0.23) and the performance seems to be much improved,
taking 20 levels to get over a second (while doubling), but am still
curious if anyone has performance optimizations or if there's a good way to
do 30+ levels.

There are two definite slowdowns that I'm aware of.

1. The dependency tree is currently processed twice per package. The first
time is to verify needed versions, but that's thrown away for no real
reason. That list could be cached instead of building it again to serialize
for output. I've been meaning to do this, but haven't gotten around to it.

2. The data structure is a linked list. This is fine for the typical case
where the chains are maybe 3 packages deep, but clearly doesn't scale far.
You could experiment with more efficient structures here.

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pkg-config/attachments/20130619/35c09a68/attachment.html>


More information about the pkg-config mailing list