[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-pkg-config
Subject:    Re: pkg-config performance with >= 15 dependency chain
From:       Sean Byland <seanb () cray ! com>
Date:       2013-06-20 17:05:57
Message-ID: CDE8A05D.897C%seanb () cray ! com
[Download RAW message or body]

Thanks for information Dan.

Sean

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


On Jun 19, 2013 2:46 PM, "Sean Byland" <seanb@cray.com<mailto:seanb@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


[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: \
after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, \
sans-serif; "> <div>Thanks for information Dan.&nbsp;</div>
<div><br>
</div>
<div>Sean</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; \
BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; \
PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: \
medium none; PADDING-TOP: 3pt"> <span style="font-weight:bold">From: </span>Dan \
Nicholson &lt;<a href="mailto:dbn.lists@gmail.com">dbn.lists@gmail.com</a>&gt;<br> \
<span style="font-weight:bold">Date: </span>Wednesday, June 19, 2013 7:39 PM<br> \
<span style="font-weight:bold">To: </span>Sean Byland &lt;<a \
href="mailto:seanb@cray.com">seanb@cray.com</a>&gt;<br> <span \
style="font-weight:bold">Cc: </span>&quot;<a \
href="mailto:pkg-config@lists.freedesktop.org">pkg-config@lists.freedesktop.org</a>&quot; \
&lt;<a href="mailto:pkg-config@lists.freedesktop.org">pkg-config@lists.freedesktop.org</a>&gt;<br>
 <span style="font-weight:bold">Subject: </span>Re: pkg-config performance with &gt;= \
15 dependency chain<br> </div>
<div><br>
</div>
<div>
<div>
<p>On Jun 19, 2013 2:46 PM, &quot;Sean Byland&quot; &lt;<a \
href="mailto:seanb@cray.com">seanb@cray.com</a>&gt; wrote:<br> &gt;<br>
&gt; 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&#43; 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>
</div>
</div>
</span>
</body>
</html>



_______________________________________________
pkg-config mailing list
pkg-config@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pkg-config

--===============0997661278==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic