<p>On Jun 19, 2013 2:46 PM, "Sean Byland" <<a href="mailto:seanb@cray.com">seanb@cray.com</a>> wrote:<br>
><br>
> 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.</p>

<p>There are two definite slowdowns that I'm aware of.</p>
<p>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.</p>

<p>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.</p>
<p>Dan</p>