pkg-config performance with >= 15 dependency chain

Sean Byland seanb at cray.com
Thu Jun 20 10:05:57 PDT 2013


Thanks for information Dan.

Sean

From: Dan Nicholson <dbn.lists at gmail.com<mailto:dbn.lists at gmail.com>>
Date: Wednesday, June 19, 2013 7:39 PM
To: Sean Byland <seanb at cray.com<mailto:seanb at cray.com>>
Cc: "pkg-config at lists.freedesktop.org<mailto:pkg-config at lists.freedesktop.org>" <pkg-config at lists.freedesktop.org<mailto:pkg-config at lists.freedesktop.org>>
Subject: Re: pkg-config performance with >= 15 dependency chain


On Jun 19, 2013 2:46 PM, "Sean Byland" <seanb at cray.com<mailto: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/20130620/a4bf49d7/attachment-0001.html>


More information about the pkg-config mailing list